You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20220714093000_add_journal_updated_on.rb 257B

12345678910
  1. class AddJournalUpdatedOn < ActiveRecord::Migration[5.2]
  2. def up
  3. add_column :journals, :updated_on, :datetime, :after => :created_on
  4. Journal.update_all('updated_on = created_on')
  5. end
  6. def down
  7. remove_column :journals, :updated_on
  8. end
  9. end