Adds budget.price and ballot.heading_id

This commit is contained in:
kikito
2016-05-24 17:38:41 +02:00
parent 9876583c1a
commit 2409cccd8f
3 changed files with 16 additions and 1 deletions

View File

@@ -0,0 +1,6 @@
class AddHeadingIdToBudgetBallot < ActiveRecord::Migration
def change
add_column :budget_ballots, :heading_id, :integer
add_index :budget_ballots, :heading_id
end
end

View File

@@ -0,0 +1,5 @@
class AddPriceToBudget < ActiveRecord::Migration
def change
add_column :budgets, :price, :integer
end
end

View File

@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20160523164449) do
ActiveRecord::Schema.define(version: 20160524144005) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -78,8 +78,11 @@ ActiveRecord::Schema.define(version: 20160523164449) do
t.integer "budget_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "heading_id"
end
add_index "budget_ballots", ["heading_id"], name: "index_budget_ballots_on_heading_id", using: :btree
create_table "budget_headings", force: :cascade do |t|
t.integer "budget_id"
t.integer "geozone_id"
@@ -138,6 +141,7 @@ ActiveRecord::Schema.define(version: 20160523164449) do
t.boolean "valuating", default: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "price"
end
create_table "campaigns", force: :cascade do |t|