Add timestamps to academic years table

This commit is contained in:
Nelson Jovel 2022-05-03 11:11:17 -07:00
parent bc27e5a0e8
commit a613f6cb93
2 changed files with 13 additions and 1 deletions

View file

@ -0,0 +1,10 @@
class AddTimestampsToAcademicYear < ActiveRecord::Migration[7.0]
def change
now = Time.zone.now
change_table :academic_years do |t|
t.timestamps default: now
end
change_column_default :academic_years, :created_at, from: now, to: nil
change_column_default :academic_years, :updated_at, from: now, to: nil
end
end