mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
update tsv only if necessary
This commit is contained in:
parent
1b2d93e118
commit
ab0fc1087d
2 changed files with 30 additions and 0 deletions
15
packages/db/migrations/0137.do.alter_library_item_tsv_update_trigger.sql
Executable file
15
packages/db/migrations/0137.do.alter_library_item_tsv_update_trigger.sql
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
-- Type: DO
|
||||
-- Name: alter_library_item_tsv_update_trigger
|
||||
-- Description: Alter library_item_tsv_update trigger on omnivore.library_item table to add conditions
|
||||
|
||||
BEGIN;
|
||||
|
||||
DROP TRIGGER IF EXISTS library_item_tsv_update ON omnivore.library_item;
|
||||
|
||||
CREATE TRIGGER library_item_tsv_update
|
||||
BEFORE INSERT OR UPDATE OF readable_content, site_name, title, author, description, note, highlight_annotations
|
||||
ON omnivore.library_item
|
||||
FOR EACH ROW
|
||||
EXECUTE PROCEDURE update_library_item_tsv();
|
||||
|
||||
COMMIT;
|
||||
15
packages/db/migrations/0137.undo.alter_library_item_tsv_update_trigger.sql
Executable file
15
packages/db/migrations/0137.undo.alter_library_item_tsv_update_trigger.sql
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
-- Type: UNDO
|
||||
-- Name: alter_library_item_tsv_update_trigger
|
||||
-- Description: Alter library_item_tsv_update trigger on omnivore.library_item table to add conditions
|
||||
|
||||
BEGIN;
|
||||
|
||||
DROP TRIGGER IF EXISTS library_item_tsv_update ON omnivore.library_item;
|
||||
|
||||
CREATE TRIGGER library_item_tsv_update
|
||||
BEFORE INSERT OR UPDATE
|
||||
ON omnivore.library_item
|
||||
FOR EACH ROW
|
||||
EXECUTE PROCEDURE update_library_item_tsv();
|
||||
|
||||
COMMIT;
|
||||
Loading…
Reference in a new issue