1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 01:39:24 +02:00

Update installation version to 16.0 and enhance videos_statistics table by adding user_agent and app fields with default values. Modify VideoStatistic class to include new properties and methods for user agent and app handling.

This commit is contained in:
Daniel Neto 2025-06-19 17:50:22 -03:00
parent 1a0db7cd54
commit fc1cfbd1cb
4 changed files with 49 additions and 6 deletions

View file

@ -369,11 +369,13 @@ CREATE TABLE IF NOT EXISTS `videos_statistics` (
`modified` DATETIME NULL DEFAULT NULL,
`lastVideoTime` INT(11) NULL DEFAULT NULL,
`session_id` VARCHAR(45) NOT NULL,
`seconds_watching_video` INT NULL,
`json` TEXT NULL,
`timezone` VARCHAR(255) NULL,
`created_php_time` INT(11) NULL,
`seconds_watching_video` INT(11) NULL DEFAULT NULL,
`json` TEXT NULL DEFAULT NULL,
`timezone` VARCHAR(255) NULL DEFAULT NULL,
`created_php_time` INT(11) NULL DEFAULT NULL,
`rewarded` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
`user_agent` VARCHAR(255) NULL,
`app` VARCHAR(45) NULL,
PRIMARY KEY (`id`),
INDEX `fk_videos_statistics_users1_idx` (`users_id` ASC),
INDEX `fk_videos_statistics_videos1_idx` (`videos_id` ASC),
@ -382,6 +384,8 @@ CREATE TABLE IF NOT EXISTS `videos_statistics` (
INDEX `sec_watchin_videos` (`seconds_watching_video` ASC),
INDEX `videos_statistics_php_time` (`created_php_time` ASC),
INDEX `videos_statistics_rewarded` (`rewarded` ASC),
INDEX `video_statistics_ua` (`user_agent` ASC),
INDEX `video_statistics_app` (`app` ASC),
CONSTRAINT `fk_videos_statistics_users1`
FOREIGN KEY (`users_id`)
REFERENCES `users` (`id`)
@ -392,7 +396,9 @@ CREATE TABLE IF NOT EXISTS `videos_statistics` (
REFERENCES `videos` (`id`)
ON DELETE CASCADE
ON UPDATE CASCADE)
ENGINE = InnoDB;
ENGINE = InnoDB
AUTO_INCREMENT = 199
DEFAULT CHARACTER SET = latin1;
-- -----------------------------------------------------