From 31fe8cd0dfa175c94eda95690638423cb731fb8c Mon Sep 17 00:00:00 2001 From: grandeljay Date: Mon, 3 Oct 2022 14:24:13 +0200 Subject: [PATCH] Fix an SQL error when trying to register --- src/pages/install.php | 2 +- src/update/0-7-0.sql | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/pages/install.php b/src/pages/install.php index d6538972..c1e2b6af 100644 --- a/src/pages/install.php +++ b/src/pages/install.php @@ -130,7 +130,7 @@ switch ($step) { `id` INT PRIMARY KEY AUTO_INCREMENT, `email` VARCHAR(64) NOT NULL UNIQUE, `password` VARCHAR(128) NOT NULL, - `password_reset_token` VARCHAR(128) NULL DEFAULT NULL, + `password_reset_token` VARCHAR(128) NULL NULL, `password_reset_valid_until` DATETIME NOT NULL DEFAULT NOW(), `last_login` DATETIME NOT NULL DEFAULT NOW(), `power` INT NOT NULL DEFAULT 0, diff --git a/src/update/0-7-0.sql b/src/update/0-7-0.sql index c0c21803..8cb5891f 100644 --- a/src/update/0-7-0.sql +++ b/src/update/0-7-0.sql @@ -19,3 +19,9 @@ CREATE TABLE `products` ( REFERENCES `wishes` (`id`) ON DELETE CASCADE ); + +/** + * Users + */ + ALTER TABLE `users` +CHANGE COLUMN `password_reset_token` VARCHAR(40) NULL DEFAULT NULL AFTER `password`;