From 7c57ff699da25a27a8ec95142581f86531394768 Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Sun, 5 May 2019 14:12:06 +0300 Subject: [PATCH] Add convert a missed timestamp column to timestamp with tz --- ...505111117_convert_slots_ends_at_to_timestamp_with_tz.rb | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 db/migrate/20190505111117_convert_slots_ends_at_to_timestamp_with_tz.rb diff --git a/db/migrate/20190505111117_convert_slots_ends_at_to_timestamp_with_tz.rb b/db/migrate/20190505111117_convert_slots_ends_at_to_timestamp_with_tz.rb new file mode 100644 index 0000000..bb852a3 --- /dev/null +++ b/db/migrate/20190505111117_convert_slots_ends_at_to_timestamp_with_tz.rb @@ -0,0 +1,7 @@ +class ConvertSlotsEndsAtToTimestampWithTz < ActiveRecord::Migration[5.2] + def up + transaction do + execute "ALTER TABLE slots ALTER ends_at TYPE timestamptz USING ends_at AT TIME ZONE 'UTC';" + end + end +end