10 lines
326 B
Ruby
10 lines
326 B
Ruby
class AddReadAtToNotifications < ActiveRecord::Migration[4.2]
|
|
def self.up
|
|
execute("ALTER TABLE public.notifications ADD COLUMN read_at TIMESTAMP; UPDATE public.notifications SET read_at = created_at;")
|
|
end
|
|
|
|
def self.down
|
|
execute("ALTER TABLE public.notifications DROP COLUMN read_at;")
|
|
end
|
|
end
|