Commit 0d598340 authored by Oswaldo Ferreira's avatar Oswaldo Ferreira

Remove unnecessary indexes

parent 95a7c020
......@@ -5,8 +5,8 @@ class CreateBoardLabels < ActiveRecord::Migration
def change
create_table :board_labels do |t|
t.references :board, index: true, foreign_key: { on_delete: :cascade }, null: false
t.references :label, index: true, foreign_key: { on_delete: :cascade }, null: false
t.references :board, foreign_key: { on_delete: :cascade }, null: false
t.references :label, foreign_key: { on_delete: :cascade }, null: false
t.index [:board_id, :label_id], unique: true
end
end
......
......@@ -5,8 +5,8 @@ class CreateBoardAssignees < ActiveRecord::Migration
def change
create_table :board_assignees do |t|
t.references :board, index: true, foreign_key: { on_delete: :cascade }, null: false
t.integer :assignee_id, null: false, index: true
t.references :board, foreign_key: { on_delete: :cascade }, null: false
t.integer :assignee_id, null: false
t.foreign_key :users, column: :assignee_id, on_delete: :cascade
t.index [:board_id, :assignee_id], unique: true
end
......
......@@ -219,9 +219,7 @@ ActiveRecord::Schema.define(version: 20171010140746) do
t.integer "assignee_id", null: false
end
add_index "board_assignees", ["assignee_id"], name: "index_board_assignees_on_assignee_id", using: :btree
add_index "board_assignees", ["board_id", "assignee_id"], name: "index_board_assignees_on_board_id_and_assignee_id", unique: true, using: :btree
add_index "board_assignees", ["board_id"], name: "index_board_assignees_on_board_id", using: :btree
create_table "board_labels", force: :cascade do |t|
t.integer "board_id", null: false
......@@ -229,8 +227,6 @@ ActiveRecord::Schema.define(version: 20171010140746) do
end
add_index "board_labels", ["board_id", "label_id"], name: "index_board_labels_on_board_id_and_label_id", unique: true, using: :btree
add_index "board_labels", ["board_id"], name: "index_board_labels_on_board_id", using: :btree
add_index "board_labels", ["label_id"], name: "index_board_labels_on_label_id", using: :btree
create_table "boards", force: :cascade do |t|
t.integer "project_id"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment