mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Add timestamp columns to event_types
... required for Rails to calculate cache keys
This commit is contained in:
parent
4951d085f5
commit
0d4c9e32cf
2 changed files with 23 additions and 9 deletions
|
|
@ -0,0 +1,12 @@
|
|||
class AddCreatedAtAndUpdatedAtToEventTypes < ActiveRecord::Migration[5.0]
|
||||
def up
|
||||
add_column :event_types, :created_at, :datetime
|
||||
add_column :event_types, :updated_at, :datetime
|
||||
EventType.update_all(created_at: Time.now, updated_at: Time.now)
|
||||
end
|
||||
|
||||
def down
|
||||
remove_column :event_types, :created_at
|
||||
remove_column :event_types, :updated_at
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue