From 24f223d92802c1572269851c47c50ce2bf8986b5 Mon Sep 17 00:00:00 2001 From: Jay Trees Date: Tue, 18 Jan 2022 12:09:59 +0100 Subject: [PATCH] Add index to password --- includes/pages/install.php | 2 +- includes/pages/update.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/pages/install.php b/includes/pages/install.php index 599dee51..7e8fc831 100644 --- a/includes/pages/install.php +++ b/includes/pages/install.php @@ -101,7 +101,7 @@ switch ($step) { $database->query('CREATE TABLE `users` ( `id` int PRIMARY KEY AUTO_INCREMENT, `email` varchar(64) NOT NULL UNIQUE, - `password` varchar(128) NOT NULL + `password` varchar(128) NOT NULL INDEX );'); /** diff --git a/includes/pages/update.php b/includes/pages/update.php index 580f60ef..9a2f46c7 100644 --- a/includes/pages/update.php +++ b/includes/pages/update.php @@ -28,6 +28,7 @@ if ('POST' === $_SERVER['REQUEST_METHOD']) { SET `isAdministrator` = ' . true . ' WHERE `id` = ' . $user->id . ';'); + $database->query('ALTER TABLE `users` ADD INDEX(`password`);'); $database->query('ALTER TABLE `wishlists` ADD `url` VARCHAR(128) NOT NULL AFTER `name`