From 7deded142f9ed0989495dc7ff1dd50378ae7a4ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Checa?= Date: Wed, 21 Mar 2018 20:15:57 +0100 Subject: [PATCH] Add Budget::Investment::Status migration --- db/migrate/20180321180149_add_status_to_milestones.rb | 8 ++++++++ db/schema.rb | 3 +++ 2 files changed, 11 insertions(+) create mode 100644 db/migrate/20180321180149_add_status_to_milestones.rb diff --git a/db/migrate/20180321180149_add_status_to_milestones.rb b/db/migrate/20180321180149_add_status_to_milestones.rb new file mode 100644 index 000000000..527d87181 --- /dev/null +++ b/db/migrate/20180321180149_add_status_to_milestones.rb @@ -0,0 +1,8 @@ +class AddStatusToMilestones < ActiveRecord::Migration + disable_ddl_transaction! + + def change + add_column :budget_investment_milestones, :status_id, :integer + add_index :budget_investment_milestones, :status_id, algorithm: :concurrently + end +end diff --git a/db/schema.rb b/db/schema.rb index e0a25c219..d1408273d 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -137,8 +137,11 @@ ActiveRecord::Schema.define(version: 20180519132610) do t.datetime "created_at", null: false t.datetime "updated_at", null: false t.datetime "publication_date" + t.integer "status_id" end + add_index "budget_investment_milestones", ["status_id"], name: "index_budget_investment_milestones_on_status_id", using: :btree + create_table "budget_investment_statuses", force: :cascade do |t| t.string "name" t.text "description"