From 5c60ee7013ef0b04a4e10e0987c156e9134c3e64 Mon Sep 17 00:00:00 2001 From: Ari Timonen Date: Thu, 2 Apr 2020 03:16:03 +0300 Subject: [PATCH] Fix migration for readings --- db/migrate/20200402000314_move_readings_to_read_marks.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/migrate/20200402000314_move_readings_to_read_marks.rb b/db/migrate/20200402000314_move_readings_to_read_marks.rb index 161a1b1..cc739b6 100644 --- a/db/migrate/20200402000314_move_readings_to_read_marks.rb +++ b/db/migrate/20200402000314_move_readings_to_read_marks.rb @@ -2,7 +2,7 @@ class MoveReadingsToReadMarks < ActiveRecord::Migration[6.0] def change # execute "TRUNCATE read_marks" execute "INSERT INTO read_marks (readable_type, readable_id, reader_type, reader_id, timestamp) - SELECT readable_type, readable_id, "User", user_id, updated_at + SELECT readable_type, readable_id, 'User', user_id, updated_at FROM readings;" end end