adds denormalization to budget::ballot::lines

This commit is contained in:
Juanjo Bazán
2016-06-11 14:57:07 +02:00
parent e849357e57
commit ab008ed4e9
5 changed files with 62 additions and 3 deletions

View File

@@ -0,0 +1,7 @@
class DesnormalizeBallotLine < ActiveRecord::Migration
def change
add_column :budget_ballot_lines, :budget_id, :integer, index: true
add_column :budget_ballot_lines, :group_id, :integer, index: true
add_column :budget_ballot_lines, :heading_id, :integer, index: true
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: 20160609152026) do
ActiveRecord::Schema.define(version: 20160610094658) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -83,6 +83,9 @@ ActiveRecord::Schema.define(version: 20160609152026) do
t.integer "investment_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "budget_id"
t.integer "group_id"
t.integer "heading_id"
end
add_index "budget_ballot_lines", ["ballot_id"], name: "index_budget_ballot_lines_on_ballot_id", using: :btree