mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
update tables
This commit is contained in:
parent
9150e7dbc2
commit
138c9682cd
2 changed files with 4 additions and 2 deletions
|
|
@ -11,9 +11,11 @@ ALTER TABLE omnivore.labels
|
|||
ADD CONSTRAINT label_name_unique UNIQUE (user_id, name);
|
||||
|
||||
CREATE TABLE omnivore.link_labels (
|
||||
id uuid PRIMARY KEY DEFAULT uuid_generate_v1mc(),
|
||||
link_id uuid NOT NULL REFERENCES omnivore.links ON DELETE CASCADE,
|
||||
label_id uuid NOT NULL REFERENCES omnivore.labels ON DELETE CASCADE,
|
||||
created_at timestamptz NOT NULL DEFAULT current_timestamp
|
||||
created_at timestamptz NOT NULL DEFAULT current_timestamp,
|
||||
UNIQUE (link_id, label_id)
|
||||
);
|
||||
|
||||
COMMIT;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ ALTER TABLE omnivore.labels
|
|||
ADD COLUMN link_id uuid REFERENCES omnivore.links ON DELETE CASCADE,
|
||||
DROP COLUMN color,
|
||||
DROP COLUMN description,
|
||||
DROP CONSTRAINT label_name;
|
||||
DROP CONSTRAINT label_name_unique;
|
||||
|
||||
DROP TABLE omnivore.link_labels;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue