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