about summary refs log tree commit diff
path: root/db/migrate/20190715164535_add_instance_actor.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20190715164535_add_instance_actor.rb')
-rw-r--r--db/migrate/20190715164535_add_instance_actor.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/db/migrate/20190715164535_add_instance_actor.rb b/db/migrate/20190715164535_add_instance_actor.rb
new file mode 100644
index 000000000..a26d54949
--- /dev/null
+++ b/db/migrate/20190715164535_add_instance_actor.rb
@@ -0,0 +1,9 @@
+class AddInstanceActor < ActiveRecord::Migration[5.2]
+  def up
+    Account.create!(id: -99, actor_type: 'Application', locked: true, username: Rails.configuration.x.local_domain)
+  end
+
+  def down
+    Account.find_by(id: -99, actor_type: 'Application').destroy!
+  end
+end