diff --git a/src/pages/install.php b/src/pages/install.php index 797bc5c5..cd4673a9 100644 --- a/src/pages/install.php +++ b/src/pages/install.php @@ -155,7 +155,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 NULL, + `password_reset_token` VARCHAR(128) NULL DEFAULT NULL, `password_reset_valid_until` DATETIME NOT NULL DEFAULT NOW(), `last_login` DATETIME NOT NULL DEFAULT NOW(), `power` INT NOT NULL DEFAULT 1, diff --git a/src/update/1-0-0.sql b/src/update/1-0-0.sql index 60c14b0d..674d1f3d 100644 --- a/src/update/1-0-0.sql +++ b/src/update/1-0-0.sql @@ -26,3 +26,8 @@ SET `power` = 1 WHERE `power` = 0; + +ALTER TABLE + `users` CHANGE COLUMN `password_reset_token` `password_reset_token` VARCHAR(40) NULL DEFAULT NULL +AFTER + `password`;