From b4fb6ad53a6c430033c98e6659cbf469529511c1 Mon Sep 17 00:00:00 2001 From: itsscb Date: Wed, 20 Sep 2023 20:16:17 +0200 Subject: [PATCH] rf/changes schema minorly --- db/migration/000001_init_schema.up.sql | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/db/migration/000001_init_schema.up.sql b/db/migration/000001_init_schema.up.sql index d5685df..7b14282 100644 --- a/db/migration/000001_init_schema.up.sql +++ b/db/migration/000001_init_schema.up.sql @@ -10,7 +10,6 @@ CREATE TABLE "mails" ( "created" timestamptz NOT NULL DEFAULT (now()), "changer" varchar NOT NULL, "changed" timestamptz NOT NULL DEFAULT (now()) - ); CREATE TABLE "customers" ( @@ -116,8 +115,8 @@ CREATE TABLE "returns" ( CREATE TABLE "returnsLog" ( "ID" bigserial UNIQUE PRIMARY KEY NOT NULL, - "returnsID" bigint, - "mailID" bigint, + "returnsID" bigint NOT NULL, + "mailID" bigint NOT NULL, "status" varchar, "creator" varchar NOT NULL, "created" timestamptz NOT NULL DEFAULT (now()), @@ -139,4 +138,4 @@ ALTER TABLE "returns" ADD FOREIGN KEY ("providerID") REFERENCES "providers" ("ID ALTER TABLE "returnsLog" ADD FOREIGN KEY ("returnsID") REFERENCES "returns" ("ID"); -ALTER TABLE "returnsLog" ADD FOREIGN KEY ("mailID") REFERENCES "mails" ("ID"); +ALTER TABLE "returnsLog" ADD FOREIGN KEY ("mailID") REFERENCES "mails" ("ID"); \ No newline at end of file