These are cherry picked from the elastic branch so we can run them and migrate data before moving to elastic as the primary page backend.
15 lines
440 B
PL/PgSQL
Executable File
15 lines
440 B
PL/PgSQL
Executable File
-- Type: DO
|
|
-- Name: migrate_elastic_page_id_data
|
|
-- Description: Migrate elastic_page_id field from article_id in highlight and article_saving_request tables
|
|
|
|
BEGIN;
|
|
|
|
UPDATE omnivore.article_saving_request
|
|
SET elastic_page_id = article_id
|
|
WHERE elastic_page_id is NULL AND article_id is NOT NULL;
|
|
UPDATE omnivore.highlight
|
|
SET elastic_page_id = article_id
|
|
WHERE elastic_page_id is NULL AND article_id is NOT NULL;
|
|
|
|
COMMIT;
|