Add index to password

This commit is contained in:
Jay Trees 2022-01-18 12:09:59 +01:00
parent 689c688199
commit 24f223d928
2 changed files with 2 additions and 1 deletions

View file

@ -101,7 +101,7 @@ switch ($step) {
$database->query('CREATE TABLE `users` ( $database->query('CREATE TABLE `users` (
`id` int PRIMARY KEY AUTO_INCREMENT, `id` int PRIMARY KEY AUTO_INCREMENT,
`email` varchar(64) NOT NULL UNIQUE, `email` varchar(64) NOT NULL UNIQUE,
`password` varchar(128) NOT NULL `password` varchar(128) NOT NULL INDEX
);'); );');
/** /**

View file

@ -28,6 +28,7 @@ if ('POST' === $_SERVER['REQUEST_METHOD']) {
SET `isAdministrator` = ' . true . ' SET `isAdministrator` = ' . true . '
WHERE `id` = ' . $user->id . WHERE `id` = ' . $user->id .
';'); ';');
$database->query('ALTER TABLE `users` ADD INDEX(`password`);');
$database->query('ALTER TABLE `wishlists` $database->query('ALTER TABLE `wishlists`
ADD `url` VARCHAR(128) NOT NULL AFTER `name` ADD `url` VARCHAR(128) NOT NULL AFTER `name`