add sql to create library_item_labels db table

This commit is contained in:
Hongbo Wu
2023-08-21 21:15:26 +08:00
parent 927414fe18
commit e722b0e248
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,13 @@
-- Type: DO
-- Name: library_item_labels
-- Description: Create table library_item_labels
BEGIN;
CREATE TABLE omnivore.library_item_labels (
library_item_id uuid NOT NULL REFERENCES omnivore.library_item(id) ON DELETE CASCADE,
label_id uuid NOT NULL REFERENCES omnivore.labels(id) ON DELETE CASCADE,
PRIMARY KEY (library_item_id, label_id)
);
COMMIT;

View File

@ -0,0 +1,9 @@
-- Type: UNDO
-- Name: library_item_labels
-- Description: Create table library_item_labels
BEGIN;
DROP TABLE omnivore.library_item_labels;
COMMIT;