From b685419b2862cb93cdbef67d5dc83255e00a0663 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Tue, 11 Dec 2018 13:49:38 +0100 Subject: [PATCH] Fix "Remove obsolete model usage" We accidentally changed the schema when modifying an existing migration. It wasn't critical because we're going to remove that table in the future, but it resulted in conflicts for users who had already run the migration before its modification. This commit fixes commit 4a7f479. --- .../20180323190027_add_translate_milestones.rb | 18 +++++++++++++----- db/schema.rb | 7 +++++-- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/db/migrate/20180323190027_add_translate_milestones.rb b/db/migrate/20180323190027_add_translate_milestones.rb index afc8db9af..2a629a473 100644 --- a/db/migrate/20180323190027_add_translate_milestones.rb +++ b/db/migrate/20180323190027_add_translate_milestones.rb @@ -1,12 +1,20 @@ class AddTranslateMilestones < ActiveRecord::Migration def change create_table :budget_investment_milestone_translations do |t| - t.integer :budget_investment_milestone_id, null: false - t.string :locale, null: false - t.string :title - t.text :description + t.integer :budget_investment_milestone_id, null: false + t.string :locale, null: false + t.timestamps null: false + t.string :title + t.text :description - t.timestamps null: false end + + add_index :budget_investment_milestone_translations, + :budget_investment_milestone_id, + name: "index_6770e7675fe296cf87aa0fd90492c141b5269e0b" + + add_index :budget_investment_milestone_translations, + :locale, + name: "index_budget_investment_milestone_translations_on_locale" end end diff --git a/db/schema.rb b/db/schema.rb index 368049987..174e2a82c 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -163,12 +163,15 @@ ActiveRecord::Schema.define(version: 20181016204729) do create_table "budget_investment_milestone_translations", force: :cascade do |t| t.integer "budget_investment_milestone_id", null: false t.string "locale", null: false - t.string "title" - t.text "description" t.datetime "created_at", null: false t.datetime "updated_at", null: false + t.string "title" + t.text "description" end + add_index "budget_investment_milestone_translations", ["budget_investment_milestone_id"], name: "index_6770e7675fe296cf87aa0fd90492c141b5269e0b", using: :btree + add_index "budget_investment_milestone_translations", ["locale"], name: "index_budget_investment_milestone_translations_on_locale", using: :btree + create_table "budget_investment_milestones", force: :cascade do |t| t.integer "investment_id" t.string "title", limit: 80