about summary refs log tree commit diff
path: root/db/migrate
diff options
context:
space:
mode:
authorDavid Yip <yipdw@member.fsf.org>2017-11-19 01:30:29 -0600
committerDavid Yip <yipdw@member.fsf.org>2017-11-19 01:30:29 -0600
commitd083f7741a5996ee24bbdb7cd177e4db2ddfaead (patch)
tree7c950b5ee0f16b59b7acae023eadd949325fc2d7 /db/migrate
parentbcda3f85ce1473e9285299979a471525b2cd7034 (diff)
parent08deec4c84f00d241d60a6962806d5abe4638edd (diff)
Merge remote-tracking branch 'tootsuite/master'
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20171118012443_add_moved_to_account_id_to_accounts.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/db/migrate/20171118012443_add_moved_to_account_id_to_accounts.rb b/db/migrate/20171118012443_add_moved_to_account_id_to_accounts.rb
new file mode 100644
index 000000000..0c8a894cc
--- /dev/null
+++ b/db/migrate/20171118012443_add_moved_to_account_id_to_accounts.rb
@@ -0,0 +1,6 @@
+class AddMovedToAccountIdToAccounts < ActiveRecord::Migration[5.1]
+  def change
+    add_column :accounts, :moved_to_account_id, :bigint, null: true, default: nil
+    add_foreign_key :accounts, :accounts, column: :moved_to_account_id, on_delete: :nullify
+  end
+end