From 579a74755dafe458ed943a92a777b95e8904a900 Mon Sep 17 00:00:00 2001 From: Daniel Neto Date: Mon, 8 Jan 2024 11:38:06 -0300 Subject: [PATCH] Add video made_for_kids option --- install/checkConfiguration.php | 2 +- install/database.sql | 2 ++ updatedb/updateDb.v14.1.sql | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 updatedb/updateDb.v14.1.sql diff --git a/install/checkConfiguration.php b/install/checkConfiguration.php index 9ca48e5005..384ce2f46c 100644 --- a/install/checkConfiguration.php +++ b/install/checkConfiguration.php @@ -5,7 +5,7 @@ if (file_exists("../videos/configuration.php")) { } -$installationVersion = "14.0"; +$installationVersion = "14.1"; require_once '../objects/functionSecurity.php'; diff --git a/install/database.sql b/install/database.sql index a1d1e1e8e9..5120d1028d 100644 --- a/install/database.sql +++ b/install/database.sql @@ -181,6 +181,7 @@ CREATE TABLE IF NOT EXISTS `videos` ( `epg_link` VARCHAR(400) NULL, `publish_datetime` DATETIME NULL, `notification_datetime` DATETIME NULL, + `made_for_kids` TINYINT(1) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), UNIQUE INDEX `clean_title_UNIQUE` (`clean_title` ASC), INDEX `fk_videos_users_idx` (`users_id` ASC), @@ -205,6 +206,7 @@ CREATE TABLE IF NOT EXISTS `videos` ( INDEX `index_epg_link` (`epg_link` ASC), INDEX `index25_publish` (`publish_datetime` ASC), INDEX `index26_publish` (`notification_datetime` ASC), + INDEX `index_made_for_kids` (`made_for_kids` ASC), CONSTRAINT `fk_videos_categories1` FOREIGN KEY (`categories_id`) REFERENCES `categories` (`id`) diff --git a/updatedb/updateDb.v14.1.sql b/updatedb/updateDb.v14.1.sql new file mode 100644 index 0000000000..a9f2b8c6d9 --- /dev/null +++ b/updatedb/updateDb.v14.1.sql @@ -0,0 +1,4 @@ +ALTER TABLE `videos` ADD COLUMN `made_for_kids` TINYINT(1) NOT NULL DEFAULT 0, +ADD INDEX `index_made_for_kids` (`made_for_kids` ASC); + +UPDATE configurations SET version = '14.1', modified = now() WHERE id = 1;