add sql to create library_item_labels db table
This commit is contained in:
13
packages/db/migrations/0120.do.library_item_labels.sql
Executable file
13
packages/db/migrations/0120.do.library_item_labels.sql
Executable 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;
|
||||
9
packages/db/migrations/0120.undo.library_item_labels.sql
Executable file
9
packages/db/migrations/0120.undo.library_item_labels.sql
Executable 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;
|
||||
Reference in New Issue
Block a user