Remove OfficerAssignment composed index
This commit is contained in:
@@ -8,7 +8,7 @@ class Poll
|
||||
|
||||
validates :officer_id, presence: true
|
||||
validates :booth_assignment_id, presence: true
|
||||
validates :date, presence: true, uniqueness: { scope: [:officer_id, :booth_assignment_id] }
|
||||
validates :date, presence: true
|
||||
|
||||
delegate :poll_id, :booth_id, to: :booth_assignment
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
class RemoveOfficerAssigmentComposedIndex < ActiveRecord::Migration
|
||||
def change
|
||||
remove_index "poll_officer_assignments", name: "index_poll_officer_assignments_on_officer_id_and_date"
|
||||
end
|
||||
end
|
||||
@@ -11,7 +11,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20171002191347) do
|
||||
ActiveRecord::Schema.define(version: 20171003095936) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
@@ -639,7 +639,6 @@ ActiveRecord::Schema.define(version: 20171002191347) do
|
||||
end
|
||||
|
||||
add_index "poll_officer_assignments", ["booth_assignment_id"], name: "index_poll_officer_assignments_on_booth_assignment_id", using: :btree
|
||||
add_index "poll_officer_assignments", ["officer_id", "date"], name: "index_poll_officer_assignments_on_officer_id_and_date", using: :btree
|
||||
add_index "poll_officer_assignments", ["officer_id"], name: "index_poll_officer_assignments_on_officer_id", using: :btree
|
||||
|
||||
create_table "poll_officers", force: :cascade do |t|
|
||||
|
||||
Reference in New Issue
Block a user