aboutsummaryrefslogtreecommitdiffstats
path: root/migrations/2020-08-23-140315_fix_screening_timestamps/up.sql
blob: fd08e80fdea156419df63d8547912aaeb9e1324e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
-- Change the type of start and end times to include data and timezone.
-- Drop the now obsolete date table
ALTER TABLE screenings
    ALTER COLUMN start_time TYPE timestamp with time zone
    USING date::TIMESTAMP + start_time,

    ALTER COLUMN end_time TYPE timestamp with time zone
    USING date::TIMESTAMP + end_time,

    DROP COLUMN date;