From b572818b2c5adc07fec4aaab1660e8b53307a485 Mon Sep 17 00:00:00 2001 From: wate Date: Tue, 26 Apr 2022 05:39:53 +0900 Subject: [PATCH] fix --- db/migrate/004_rename_glossary_terms_from_terms.rb | 2 ++ 1 file changed, 2 insertions(+) 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