Add Globalize to Milestones

This commit is contained in:
rgarcia
2018-04-10 13:15:36 +02:00
committed by iagirre
parent 1b52ecc9ec
commit f7486b9238
15 changed files with 265 additions and 5 deletions

View File

@@ -0,0 +1,12 @@
class AddTranslateMilestones < ActiveRecord::Migration
def self.up
Budget::Investment::Milestone.create_translation_table!({
title: :string,
description: :text
})
end
def self.down
Budget::Investment::Milestone.drop_translation_table!
end
end

View File

@@ -118,6 +118,18 @@ ActiveRecord::Schema.define(version: 20180320104823) do
add_index "budget_headings", ["group_id"], name: "index_budget_headings_on_group_id", using: :btree
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"
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