From e67f71999847b79b6a17c13935b9831468eddf72 Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Sun, 5 May 2019 14:18:36 +0300 Subject: [PATCH] Convert end_date in conferences to timestamp with tz --- ...57_convert_conferences_end_date_to_timestamp_with_tz.rb | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 db/migrate/20190505111757_convert_conferences_end_date_to_timestamp_with_tz.rb diff --git a/db/migrate/20190505111757_convert_conferences_end_date_to_timestamp_with_tz.rb b/db/migrate/20190505111757_convert_conferences_end_date_to_timestamp_with_tz.rb new file mode 100644 index 0000000..517ea3c --- /dev/null +++ b/db/migrate/20190505111757_convert_conferences_end_date_to_timestamp_with_tz.rb @@ -0,0 +1,7 @@ +class ConvertConferencesEndDateToTimestampWithTz < ActiveRecord::Migration[5.2] + def up + transaction do + execute "ALTER TABLE conferences ALTER end_date TYPE timestamptz USING end_date AT TIME ZONE 'UTC';" + end + end +end