mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
add sql to create library_item_labels db table
This commit is contained in:
parent
927414fe18
commit
e722b0e248
2 changed files with 22 additions and 0 deletions
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;
|
||||
Loading…
Reference in a new issue