Adds missing budget_id to investments

This commit is contained in:
kikito
2016-05-20 17:55:51 +02:00
parent 10625532d0
commit cf0b7a53b0
2 changed files with 7 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
class AddBudgetIdToInvestments < ActiveRecord::Migration
def change
add_reference :budget_investments, :budget, index: true
end
end

View File

@@ -111,11 +111,13 @@ ActiveRecord::Schema.define(version: 20160523143320) do
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.integer "heading_id" t.integer "heading_id"
t.integer "budget_id"
end end
add_index "budget_investments", ["administrator_id"], name: "index_budget_investments_on_administrator_id", using: :btree add_index "budget_investments", ["administrator_id"], name: "index_budget_investments_on_administrator_id", using: :btree
add_index "budget_investments", ["author_id"], name: "index_budget_investments_on_author_id", using: :btree add_index "budget_investments", ["author_id"], name: "index_budget_investments_on_author_id", using: :btree
add_index "budget_investments", ["heading_id"], name: "index_budget_investments_on_heading_id", using: :btree add_index "budget_investments", ["heading_id"], name: "index_budget_investments_on_heading_id", using: :btree
add_index "budget_investments", ["budget_id"], name: "index_budget_investments_on_budget_id", using: :btree
add_index "budget_investments", ["tsv"], name: "index_budget_investments_on_tsv", using: :gin add_index "budget_investments", ["tsv"], name: "index_budget_investments_on_tsv", using: :gin
create_table "budgets", force: :cascade do |t| create_table "budgets", force: :cascade do |t|