fix: topology sort. again
This commit is contained in:
parent
f3fa41382a
commit
ed79c71273
1 changed files with 8 additions and 8 deletions
|
|
@ -1,10 +1,10 @@
|
||||||
-- TODO:
|
-- TODO:
|
||||||
-- maybe jsonb constraints
|
-- maybe jsonb constraints
|
||||||
-- clean unused images
|
-- clea('finished', 'ongoing', 'planned');
|
||||||
|
CREATE TYPE release_seasn unused images
|
||||||
CREATE TYPE usertitle_status_t AS ENUM ('finished', 'planned', 'dropped', 'in-progress');
|
CREATE TYPE usertitle_status_t AS ENUM ('finished', 'planned', 'dropped', 'in-progress');
|
||||||
CREATE TYPE storage_type_t AS ENUM ('local', 's3');
|
CREATE TYPE storage_type_t AS ENUM ('local', 's3');
|
||||||
CREATE TYPE title_status_t AS ENUM ('finished', 'ongoing', 'planned');
|
CREATE TYPE title_status_t AS ENUM on_t AS ENUM ('winter', 'spring', 'summer', 'fall');
|
||||||
CREATE TYPE release_season_t AS ENUM ('winter', 'spring', 'summer', 'fall');
|
|
||||||
|
|
||||||
CREATE TABLE providers (
|
CREATE TABLE providers (
|
||||||
id bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
|
id bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
|
||||||
|
|
@ -107,17 +107,17 @@ CREATE TABLE signals (
|
||||||
pending boolean NOT NULL
|
pending boolean NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE TABLE external_services (
|
||||||
|
id bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
|
||||||
|
name text UNIQUE NOT NULL
|
||||||
|
);
|
||||||
|
|
||||||
CREATE TABLE external_ids (
|
CREATE TABLE external_ids (
|
||||||
user_id bigint NOT NULL REFERENCES users (id),
|
user_id bigint NOT NULL REFERENCES users (id),
|
||||||
service_id bigint REFERENCES external_services (id),
|
service_id bigint REFERENCES external_services (id),
|
||||||
external_id text NOT NULL
|
external_id text NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE external_services (
|
|
||||||
id bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
|
|
||||||
name text UNIQUE NOT NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
-- Functions
|
-- Functions
|
||||||
CREATE OR REPLACE FUNCTION update_title_rating()
|
CREATE OR REPLACE FUNCTION update_title_rating()
|
||||||
RETURNS TRIGGER AS $$
|
RETURNS TRIGGER AS $$
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue