From c0ce352f5dc555fe46f0b043387680b7ee5a05d0 Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Fri, 3 Jul 2026 14:02:17 +0200 Subject: [PATCH] remove the primary key from the allowedClients, so the idp does not keep forgetting what clients it had allowed --- init.php | 2 +- upgrade/0.4.1/upgrade.php | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 upgrade/0.4.1/upgrade.php diff --git a/init.php b/init.php index af5668d..a24fe11 100644 --- a/init.php +++ b/init.php @@ -19,7 +19,7 @@ function initDatabase() { clientData TEXT NOT NULL )', 'CREATE TABLE IF NOT EXISTS allowedClients ( - userId VARCHAR(255) NOT NULL PRIMARY KEY, + userId VARCHAR(255) NOT NULL, clientId VARCHAR(255) NOT NULL )', 'CREATE TABLE IF NOT EXISTS userStorage ( diff --git a/upgrade/0.4.1/upgrade.php b/upgrade/0.4.1/upgrade.php new file mode 100644 index 0000000..c00f8ee --- /dev/null +++ b/upgrade/0.4.1/upgrade.php @@ -0,0 +1,28 @@ +exec($statement); + } + } catch(\PDOException $e) { + echo $e->getMessage(); + } + } + upgradeDatabase();