Remove obsolete model usage
We'd rather keep the table so future data migrations work smoothly, so we change the migration in order to create the translation table without using models.
This commit is contained in:
@@ -1,15 +1,12 @@
|
||||
class AddTranslateMilestones < ActiveRecord::Migration
|
||||
def self.up
|
||||
Budget::Investment::Milestone.create_translation_table!(
|
||||
{
|
||||
title: :string,
|
||||
description: :text
|
||||
},
|
||||
{ migrate_data: true }
|
||||
)
|
||||
end
|
||||
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
|
||||
|
||||
def self.down
|
||||
Budget::Investment::Milestone.drop_translation_table!
|
||||
t.timestamps null: false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -163,15 +163,12 @@ 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.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.string "title"
|
||||
t.text "description"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user