10 lines
321 B
Ruby
10 lines
321 B
Ruby
class AddReadAtToNotifications < ActiveRecord::Migration
|
|
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
|