Fix migration for readings

This commit is contained in:
Ari Timonen 2020-04-02 03:16:03 +03:00
parent 7ae3487d59
commit 5c60ee7013

View file

@ -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