Merge pull request #3220 from omnivore-app/fix/migration

remove updating folder sql from migration script which caused locks
This commit is contained in:
Hongbo Wu 2023-12-08 15:26:43 +08:00 committed by GitHub
commit a068b16cb1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 22 deletions

View file

@ -14,9 +14,6 @@ ALTER TABLE omnivore.library_item
ADD COLUMN preview_content_type text,
ADD COLUMN folder text NOT NULL DEFAULT 'inbox';
UPDATE omnivore.library_item SET folder = 'archive' WHERE archived_at IS NOT NULL;
UPDATE omnivore.library_item SET folder = 'trash' WHERE deleted_at IS NOT NULL;
CREATE POLICY library_item_admin_policy on omnivore.library_item
FOR ALL
TO omnivore_admin

View file

@ -1,9 +0,0 @@
-- Type: DO
-- Name: update_folder_in_library_item
-- Description: Update folder column in library_item table
BEGIN;
UPDATE omnivore.library_item SET folder = 'inbox' WHERE folder = 'archive' OR folder = 'trash';
COMMIT;

View file

@ -1,10 +0,0 @@
-- Type: UNDO
-- Name: update_folder_in_library_item
-- Description: Update folder column in library_item table
BEGIN;
UPDATE omnivore.library_item SET folder = 'archive' WHERE archived_at IS NOT NULL;
UPDATE omnivore.library_item SET folder = 'trash' WHERE deleted_at IS NOT NULL;
COMMIT;