Adds DB constraint to avoid duplicate balloted investments

This commit is contained in:
rgarcia
2017-05-03 18:43:22 +02:00
parent 4069875603
commit 767a43bb0f
3 changed files with 30 additions and 1 deletions

View File

@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20170428111355) do
ActiveRecord::Schema.define(version: 20170503163330) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -88,6 +88,7 @@ ActiveRecord::Schema.define(version: 20170428111355) do
t.integer "heading_id"
end
add_index "budget_ballot_lines", ["ballot_id", "investment_id"], name: "index_budget_ballot_lines_on_ballot_id_and_investment_id", unique: true, using: :btree
add_index "budget_ballot_lines", ["ballot_id"], name: "index_budget_ballot_lines_on_ballot_id", using: :btree
add_index "budget_ballot_lines", ["investment_id"], name: "index_budget_ballot_lines_on_investment_id", using: :btree