diff --git a/db/migrate/004_rename_glossary_terms_from_terms.rb b/db/migrate/004_rename_glossary_terms_from_terms.rb index 29c0d9d..d920e82 100644 --- a/db/migrate/004_rename_glossary_terms_from_terms.rb +++ b/db/migrate/004_rename_glossary_terms_from_terms.rb @@ -3,7 +3,9 @@ class RenameGlossaryTermsFromTerms < ActiveRecord::Migration[5.2] remove_column :terms, :tech_en, :string remove_column :terms, :name_cn, :string remove_column :terms, :name_fr, :string + change_column :terms, :created_on, :timestamp, default: -> { 'CURRENT_TIMESTAMP' } rename_column :terms, :created_on, :created_at + change_column :terms, :updated_on, :timestamp, default: -> { 'CURRENT_TIMESTAMP' } rename_column :terms, :updated_on, :updated_at rename_table :terms, :glossary_terms end