From 14c4a33cd9bfc1212cb362897272e5ea7d1529e5 Mon Sep 17 00:00:00 2001 From: Akihiko Odaki Date: Tue, 12 Dec 2017 12:11:17 +0900 Subject: Change account_id non-nullable in lists (#5979) --- db/schema.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'db/schema.rb') diff --git a/db/schema.rb b/db/schema.rb index cf0deb826..7887f26a2 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: 20171130000000) do +ActiveRecord::Schema.define(version: 20171201000000) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -209,7 +209,7 @@ ActiveRecord::Schema.define(version: 20171130000000) do 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 -- cgit From cfa3f55221733664004deb14f70764be4752b7bb Mon Sep 17 00:00:00 2001 From: abcang Date: Wed, 13 Dec 2017 01:38:42 +0900 Subject: Remove duplicate indexes in lists (#5990) --- db/migrate/20171212195226_remove_duplicate_indexes_in_lists.rb | 6 ++++++ db/schema.rb | 4 +--- 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 db/migrate/20171212195226_remove_duplicate_indexes_in_lists.rb (limited to 'db/schema.rb') 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 7887f26a2..c55020fa4 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: 20171201000000) do +ActiveRecord::Schema.define(version: 20171212195226) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -202,10 +202,8 @@ ActiveRecord::Schema.define(version: 20171201000000) 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| -- cgit