diff options
author | David Yip <yipdw@member.fsf.org> | 2017-12-15 12:20:56 -0600 |
---|---|---|
committer | David Yip <yipdw@member.fsf.org> | 2017-12-15 12:20:56 -0600 |
commit | 82b2e224a26765caf743b24844912faa2de9873a (patch) | |
tree | 1ee49dd3dbcef7867ad93f875262951612815851 /db | |
parent | 6abb0950c6f694607cdc6a0c564751400d52ad5a (diff) | |
parent | e0a573a2cef924fdfec2cd7ec96a712fe2de1511 (diff) |
Merge branch 'gs-master' into prevent-local-only-federation
Conflicts: db/schema.rb
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20171201000000_change_account_id_nonnullable_in_lists.rb | 7 | ||||
-rw-r--r-- | db/migrate/20171212195226_remove_duplicate_indexes_in_lists.rb | 6 | ||||
-rw-r--r-- | db/schema.rb | 6 |
3 files changed, 15 insertions, 4 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 diff --git a/db/schema.rb b/db/schema.rb index de74a300c..9410cdab5 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20171210213213) do +ActiveRecord::Schema.define(version: 20171212195226) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -211,14 +211,12 @@ ActiveRecord::Schema.define(version: 20171210213213) do t.bigint "account_id", null: false t.bigint "follow_id", null: false t.index ["account_id", "list_id"], name: "index_list_accounts_on_account_id_and_list_id", unique: true - t.index ["account_id"], name: "index_list_accounts_on_account_id" t.index ["follow_id"], name: "index_list_accounts_on_follow_id" t.index ["list_id", "account_id"], name: "index_list_accounts_on_list_id_and_account_id" - t.index ["list_id"], name: "index_list_accounts_on_list_id" end create_table "lists", force: :cascade do |t| - t.bigint "account_id" + t.bigint "account_id", null: false t.string "title", default: "", null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false |