mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-27 04:51:14 +00:00
6bcfffa1ee
- Use ruby 2.7.7 as it fixed startup issues - Update gems - Remove depr. from puma startup - Make entry.sh dir-agnostic Fix tests: - Use apparition - Update migrations to use new syntax - Some other minor changes
8 lines
373 B
Ruby
8 lines
373 B
Ruby
class MoveReadingsToReadMarks < ActiveRecord::Migration[4.2][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
|
|
FROM readings GROUP BY readable_type, readable_id, user_id;"
|
|
end
|
|
end
|