about summary refs log tree commit diff
path: root/db/migrate
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20171201000000_change_account_id_nonnullable_in_lists.rb7
-rw-r--r--db/migrate/20171212195226_remove_duplicate_indexes_in_lists.rb6
2 files changed, 13 insertions, 0 deletions
diff --git a/db/migrate/20171201000000_change_account_id_nonnullable_in_lists.rb b/db/migrate/20171201000000_change_account_id_nonnullable_in_lists.rb
new file mode 100644
index 000000000..120f74402
--- /dev/null
+++ b/db/migrate/20171201000000_change_account_id_nonnullable_in_lists.rb
@@ -0,0 +1,7 @@
+require Rails.root.join('lib', 'mastodon', 'migration_helpers')
+
+class ChangeAccountIdNonnullableInLists < ActiveRecord::Migration[5.1]
+  def change
+    change_column_null :lists, :account_id, false
+  end
+end
diff --git a/db/migrate/20171212195226_remove_duplicate_indexes_in_lists.rb b/db/migrate/20171212195226_remove_duplicate_indexes_in_lists.rb
new file mode 100644
index 000000000..03f2591a8
--- /dev/null
+++ b/db/migrate/20171212195226_remove_duplicate_indexes_in_lists.rb
@@ -0,0 +1,6 @@
+class RemoveDuplicateIndexesInLists < ActiveRecord::Migration[5.1]
+  def change
+    remove_index :list_accounts, name: "index_list_accounts_on_account_id"
+    remove_index :list_accounts, name: "index_list_accounts_on_list_id"
+  end
+end