1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 09:49:28 +02:00

Speed up categories

This commit is contained in:
daniel 2020-01-06 19:27:02 -03:00
parent 4e23f2d07c
commit d00e79ba53
3 changed files with 14 additions and 1 deletions

View file

@ -4,7 +4,7 @@ if (file_exists("../videos/configuration.php")) {
exit; exit;
} }
$installationVersion = "8.1"; $installationVersion = "8.2";
header('Content-Type: application/json'); header('Content-Type: application/json');

View file

@ -76,6 +76,7 @@ CREATE TABLE IF NOT EXISTS `categories` (
`allow_download` TINYINT(1) NULL DEFAULT 1, `allow_download` TINYINT(1) NULL DEFAULT 1,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
INDEX `fk_categories_users1_idx` (`users_id` ASC), INDEX `fk_categories_users1_idx` (`users_id` ASC),
INDEX `clean_name_INDEX2` (`clean_name` ASC),
UNIQUE INDEX `clean_name_UNIQUE` (`clean_name` ASC), UNIQUE INDEX `clean_name_UNIQUE` (`clean_name` ASC),
CONSTRAINT `fk_categories_users1` CONSTRAINT `fk_categories_users1`
FOREIGN KEY (`users_id`) FOREIGN KEY (`users_id`)

View file

@ -0,0 +1,12 @@
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
ALTER TABLE `categories`
ADD INDEX `clean_name_INDEX2` (`clean_name` ASC);
UPDATE configurations SET version = '8.2', modified = now() WHERE id = 1;
SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;