mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +02:00
Version 9.1 adding some indexes on the database to speedup video queries
This commit is contained in:
parent
2bbe672211
commit
30b70b7466
3 changed files with 17 additions and 1 deletions
|
@ -4,7 +4,7 @@ if (file_exists("../videos/configuration.php")) {
|
|||
exit;
|
||||
}
|
||||
|
||||
$installationVersion = "9.0";
|
||||
$installationVersion = "9.1";
|
||||
|
||||
|
||||
header('Content-Type: application/json');
|
||||
|
|
|
@ -79,6 +79,7 @@ CREATE TABLE IF NOT EXISTS `categories` (
|
|||
INDEX `fk_categories_users1_idx` (`users_id` ASC),
|
||||
INDEX `clean_name_INDEX2` (`clean_name` ASC),
|
||||
INDEX `sortcategoryOrderIndex` (`order` ASC),
|
||||
INDEX `category_name_idx` (`name` ASC),
|
||||
UNIQUE INDEX `clean_name_UNIQUE` (`clean_name` ASC),
|
||||
CONSTRAINT `fk_categories_users1`
|
||||
FOREIGN KEY (`users_id`)
|
||||
|
|
15
updatedb/updateDb.v9.1.sql
Normal file
15
updatedb/updateDb.v9.1.sql
Normal file
|
@ -0,0 +1,15 @@
|
|||
-- this update we had to update the sweet alert, you may need to update all your plugins
|
||||
-- the filepath, in case we want to store the videos in a subdirectory of videos dir
|
||||
-- filesize to start to count how much space the user is consuming.
|
||||
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 `category_name_idx` (`name` ASC);
|
||||
|
||||
UPDATE configurations SET version = '9.1', 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;
|
Loading…
Add table
Add a link
Reference in a new issue