diff --git a/ScriptsDB/20231101-01- add epic support.sql b/ScriptsDB/20231101-01- add epic support.sql index a7f89ebe..b173a525 100644 --- a/ScriptsDB/20231101-01- add epic support.sql +++ b/ScriptsDB/20231101-01- add epic support.sql @@ -1,7 +1,7 @@ -CREATE TABLE IF NOT EXISTS "epic_id_mapping" ( - "epic_id" varchar(64) NOT NULL, - "user_id" integer NOT NULL, - "last_login" integer NOT NULL, - CONSTRAINT "fk_epic_id_mapping" FOREIGN KEY("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE, - CREATE UNIQUE INDEX epic_id_mapping_idx ON data(epic_id, user_id); +CREATE TABLE IF NOT EXISTS epic_id_mapping ( + epic_id varchar(64) NOT NULL, + user_id integer NOT NULL, + last_login integer NOT NULL, + CONSTRAINT fk_epic_id_mapping FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT unique_epic_user_id UNIQUE (epic_id, user_id) ); \ No newline at end of file