Fix patches

This commit is contained in:
DariusIII
2015-10-26 08:45:05 +01:00
parent 595b860617
commit cd9fcfe467
4 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ DROP TABLE IF EXISTS videos;
CREATE TABLE videos (
id MEDIUMINT(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Show''s ID to be used in other tables as reference.',
type TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT '0 = TV, 1 = Film, 2 = Anime',
title VARCHAR(180) CHARSET = utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Name of the video.',
title VARCHAR(180) CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Name of the video.',
countries_id CHAR(2) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT 'Two character country code (FK to countries table).',
started DATETIME NOT NULL COMMENT 'Date (UTC) of production''s first airing.',
imdb MEDIUMINT(11) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'ID number for IMDB site (without the ''tt'' prefix).',
+3 -3
View File
@@ -4,12 +4,12 @@
DROP TABLE IF EXISTS tv_info;
CREATE TABLE tv_info (
videos_id MEDIUMINT(11) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'FK to video.id',
summary TEXT CHARSET = utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Description/summary of the show.',
publisher VARCHAR(50) CHARSET = utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'The channel/network of production/release (ABC, BBC, Showtime, etc.).',
summary TEXT CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Description/summary of the show.',
publisher VARCHAR(50) CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'The channel/network of production/release (ABC, BBC, Showtime, etc.).',
image TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Does the video have a cover image?',
PRIMARY KEY (videos_id),
KEY ix_tv_info_image (image)
)
ENGINE = MyISAM
DEFAULT CHARSET = utf8
COLLATE = utf8_unicode_ci;
COLLATE = utf8_unicode_ci;
@@ -8,9 +8,9 @@ CREATE TABLE tv_episodes (
series SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Number of series/season.',
episode SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Number of episode within series',
se_complete VARCHAR(10) COLLATE utf8_unicode_ci NOT NULL COMMENT 'String version of Series/Episode as taken from release subject (i.e. S02E21+22).',
title VARCHAR(180) CHARSET = utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Title of the episode.',
title VARCHAR(180) CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Title of the episode.',
firstaired DATETIME NOT NULL COMMENT 'Date of original airing/release.',
summary TEXT CHARSET = utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Description/summary of the episode.',
summary TEXT CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Description/summary of the episode.',
PRIMARY KEY (id),
UNIQUE INDEX ix_tv_episodes_videos_id (videos_id, series, episode)
)
@@ -1,6 +1,6 @@
# This patch will make the necessary changes to the user_series
# table to support the new videos implementation
# At this time, we're not sure if we can preserve the users shows
# At this time, we are not sure if we can preserve the users shows
# data as the tvrage data is largely useless due to the title insert bug
# Truncate for now
@@ -10,4 +10,4 @@ TRUNCATE TABLE userseries;
ALTER TABLE userseries
DROP INDEX ix_userseries_userid,
CHANGE COLUMN rageid videos_id INT(16) NOT NULL COMMENT 'FK to videos.id',
ADD INDEX ix_userseries_videos_id (userid, videos_id);
ADD INDEX ix_userseries_videos_id (userid, videos_id);