From 6d941f8b5203d2d2d43587ee2a969c36756ef738 Mon Sep 17 00:00:00 2001 From: Bertocq Date: Wed, 21 Jun 2017 20:08:35 +0200 Subject: [PATCH] Add population integer attribute to Budget::Heading model table --- .../20170621180611_add_population_to_budget_headings.rb | 5 +++++ db/schema.rb | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20170621180611_add_population_to_budget_headings.rb diff --git a/db/migrate/20170621180611_add_population_to_budget_headings.rb b/db/migrate/20170621180611_add_population_to_budget_headings.rb new file mode 100644 index 000000000..b17673397 --- /dev/null +++ b/db/migrate/20170621180611_add_population_to_budget_headings.rb @@ -0,0 +1,5 @@ +class AddPopulationToBudgetHeadings < ActiveRecord::Migration + def change + add_column :budget_headings, :population, :integer, default: 0 + end +end diff --git a/db/schema.rb b/db/schema.rb index 8fae3e8dd..64b81a350 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: 20170613203256) do +ActiveRecord::Schema.define(version: 20170621180611) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -110,6 +110,7 @@ ActiveRecord::Schema.define(version: 20170613203256) do t.integer "group_id" t.string "name", limit: 50 t.integer "price", limit: 8 + t.integer "population", default: 0 end add_index "budget_headings", ["group_id"], name: "index_budget_headings_on_group_id", using: :btree