Remove deprecated attributes from Legislation::Draft::Version

Some fields from LegislationDraftVersion are translatable and we no
longer need them. This commit will remove the annoying deprecation
warning thrown by Globalize gem after gem version update.
This commit is contained in:
Senén Rodero Rodríguez
2019-02-21 17:48:45 +01:00
committed by voodoorai2000
parent 400a5719df
commit e28a1a4a8e
2 changed files with 9 additions and 5 deletions

View File

@@ -0,0 +1,9 @@
class RemoveDeprecatedTranslatableFieldsFromLegislationDraftVersions < ActiveRecord::Migration[4.2]
def change
remove_column :legislation_draft_versions, :title, :string
remove_column :legislation_draft_versions, :changelog, :text
remove_column :legislation_draft_versions, :body, :text
remove_column :legislation_draft_versions, :body_html, :text
remove_column :legislation_draft_versions, :toc_html, :text
end
end

View File

@@ -722,16 +722,11 @@ ActiveRecord::Schema.define(version: 20190607160900) do
create_table "legislation_draft_versions", force: :cascade do |t|
t.integer "legislation_process_id"
t.string "title"
t.text "changelog"
t.string "status", default: "draft"
t.boolean "final_version", default: false
t.text "body"
t.datetime "hidden_at"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.text "body_html"
t.text "toc_html"
t.index ["hidden_at"], name: "index_legislation_draft_versions_on_hidden_at", using: :btree
t.index ["legislation_process_id"], name: "index_legislation_draft_versions_on_legislation_process_id", using: :btree
t.index ["status"], name: "index_legislation_draft_versions_on_status", using: :btree