mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
create rss_subscription db table
This commit is contained in:
parent
a7773bf00b
commit
d9130879d8
2 changed files with 29 additions and 0 deletions
20
packages/db/migrations/0114.do.rss_subscription.sql
Executable file
20
packages/db/migrations/0114.do.rss_subscription.sql
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
-- Type: DO
|
||||
-- Name: rss_subscription
|
||||
-- Description: Create a table for RSS subscriptions
|
||||
|
||||
BEGIN;
|
||||
|
||||
CREATE TABLE omnivore.rss_subscription (
|
||||
id uuid PRIMARY KEY DEFAULT uuid_generate_v1mc(),
|
||||
user_id uuid NOT NULL REFERENCES omnivore.user ON DELETE CASCADE,
|
||||
title character varying(255) NOT NULL,
|
||||
description TEXT,
|
||||
url TEXT NOT NULL,
|
||||
image_url TEXT,
|
||||
count integer NOT NULL DEFAULT 0,
|
||||
last_updated timestamptz,
|
||||
created_at timestamptz NOT NULL DEFAULT current_timestamp,
|
||||
updated_at timestamptz NOT NULL DEFAULT current_timestamp,
|
||||
);
|
||||
|
||||
COMMIT;
|
||||
9
packages/db/migrations/0114.undo.rss_subscription.sql
Executable file
9
packages/db/migrations/0114.undo.rss_subscription.sql
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
-- Type: UNDO
|
||||
-- Name: rss_subscription
|
||||
-- Description: Create a table for RSS subscriptions
|
||||
|
||||
BEGIN;
|
||||
|
||||
DROP TABLE IF EXISTS omnivore.rss_subscription;
|
||||
|
||||
COMMIT;
|
||||
Loading…
Reference in a new issue