mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
add sql to create library_item_subscriptions db table
This commit is contained in:
parent
9d2ca1f934
commit
927414fe18
2 changed files with 22 additions and 0 deletions
13
packages/db/migrations/0119.do.library_item_subscriptions.sql
Executable file
13
packages/db/migrations/0119.do.library_item_subscriptions.sql
Executable file
|
|
@ -0,0 +1,13 @@
|
|||
-- Type: DO
|
||||
-- Name: library_item_subscriptions
|
||||
-- Description: Create a join table for library item and subscriptions
|
||||
|
||||
BEGIN;
|
||||
|
||||
CREATE TABLE omnivore.library_item_subscriptions (
|
||||
library_item_id uuid NOT NULL REFERENCES omnivore.library_item(id) ON DELETE CASCADE,
|
||||
subscription_id uuid NOT NULL REFERENCES omnivore.subscriptions(id) ON DELETE CASCADE,
|
||||
PRIMARY KEY (library_item_id, subscription_id)
|
||||
);
|
||||
|
||||
COMMIT;
|
||||
9
packages/db/migrations/0119.undo.library_item_subscriptions.sql
Executable file
9
packages/db/migrations/0119.undo.library_item_subscriptions.sql
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
-- Type: UNDO
|
||||
-- Name: library_item_subscriptions
|
||||
-- Description: Create a join table for library item and subscriptions
|
||||
|
||||
BEGIN;
|
||||
|
||||
DROP TABLE omnivore.library_item_subscriptions;
|
||||
|
||||
COMMIT;
|
||||
Loading…
Reference in a new issue