diff --git a/db/migrate/20160524143107_add_heading_id_to_budget_ballot.rb b/db/migrate/20160524143107_add_heading_id_to_budget_ballot.rb new file mode 100644 index 000000000..2bc254fbe --- /dev/null +++ b/db/migrate/20160524143107_add_heading_id_to_budget_ballot.rb @@ -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 diff --git a/db/migrate/20160524144005_add_price_to_budget.rb b/db/migrate/20160524144005_add_price_to_budget.rb new file mode 100644 index 000000000..14c96dd7a --- /dev/null +++ b/db/migrate/20160524144005_add_price_to_budget.rb @@ -0,0 +1,5 @@ +class AddPriceToBudget < ActiveRecord::Migration + def change + add_column :budgets, :price, :integer + end +end diff --git a/db/schema.rb b/db/schema.rb index ed8e3ed58..04889b20a 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -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|