From 27d087b14ce4bce49757e362b21923791e46bf81 Mon Sep 17 00:00:00 2001 From: Eike Kettner Date: Mon, 14 Dec 2020 14:26:24 +0100 Subject: [PATCH] Fix foreign key constraints --- .../src/main/resources/db/migration/h2/V1.15.0__rememberme.sql | 3 +-- .../resources/db/migration/mariadb/V1.15.0__rememberme.sql | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/store/src/main/resources/db/migration/h2/V1.15.0__rememberme.sql b/modules/store/src/main/resources/db/migration/h2/V1.15.0__rememberme.sql index 45bb52bfe4..f52f38c1fc 100644 --- a/modules/store/src/main/resources/db/migration/h2/V1.15.0__rememberme.sql +++ b/modules/store/src/main/resources/db/migration/h2/V1.15.0__rememberme.sql @@ -4,6 +4,5 @@ CREATE TABLE "rememberme" ( "login" varchar(254) not null, "created" timestamp not null, "uses" int not null, - FOREIGN KEY ("cid") REFERENCES "user_"("cid"), - FOREIGN KEY ("login") REFERENCES "user_"("login") + FOREIGN KEY ("cid","login") REFERENCES "user_"("cid","login") ); diff --git a/modules/store/src/main/resources/db/migration/mariadb/V1.15.0__rememberme.sql b/modules/store/src/main/resources/db/migration/mariadb/V1.15.0__rememberme.sql index bc15f1dbfa..cb76f3f941 100644 --- a/modules/store/src/main/resources/db/migration/mariadb/V1.15.0__rememberme.sql +++ b/modules/store/src/main/resources/db/migration/mariadb/V1.15.0__rememberme.sql @@ -4,6 +4,5 @@ CREATE TABLE `rememberme` ( `login` varchar(254) not null, `created` timestamp not null, `uses` int not null, - FOREIGN KEY (`cid`) REFERENCES `user_`(`cid`), - FOREIGN KEY (`login`) REFERENCES `user_`(`login`) + FOREIGN KEY (`cid`,`login`) REFERENCES `user_`(`cid`,`login`) );