mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-08 23:18:18 -07:00
Add timestamps to academic years table
This commit is contained in:
parent
bc27e5a0e8
commit
a613f6cb93
2 changed files with 13 additions and 1 deletions
10
db/migrate/20220503180142_add_timestamps_to_academic_year.rb
Normal file
10
db/migrate/20220503180142_add_timestamps_to_academic_year.rb
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue