From 6099222edced02c73fdb9a62bbab9ca2d368ceb2 Mon Sep 17 00:00:00 2001 From: DariusIII Date: Mon, 26 Oct 2015 10:03:41 +0100 Subject: [PATCH] Add anidb id to videos table, add the missing patch --- Changelog | 1 + resources/db/patches/mysql/+1~videos.sql | 3 +++ .../{+6~user_series.sql => +2~user_series.sql} | 0 resources/db/patches/mysql/0201~videos.sql | 3 +++ resources/db/patches/mysql/0202~user_series.sql | 13 +++++++++++++ 5 files changed, 20 insertions(+) create mode 100644 resources/db/patches/mysql/+1~videos.sql rename resources/db/patches/mysql/{+6~user_series.sql => +2~user_series.sql} (100%) create mode 100644 resources/db/patches/mysql/0201~videos.sql create mode 100644 resources/db/patches/mysql/0202~user_series.sql diff --git a/Changelog b/Changelog index 33b920c08..cb6f8d9c7 100755 --- a/Changelog +++ b/Changelog @@ -1,4 +1,5 @@ 2015-10-26 DariusIII + Upd: Add anidb id to video table, add the missing patch Fix: Remove non-existant processTVDB from postprocess. Fix: Typo in array Chg: Revamp TV processing diff --git a/resources/db/patches/mysql/+1~videos.sql b/resources/db/patches/mysql/+1~videos.sql new file mode 100644 index 000000000..10f460c8d --- /dev/null +++ b/resources/db/patches/mysql/+1~videos.sql @@ -0,0 +1,3 @@ +# Alter videos table to add anidb id column + +ALTER IGNORE TABLE videos ADD COLUMN anidb MEDIUMINT(11) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'ID number for anidb site' AFTER started; diff --git a/resources/db/patches/mysql/+6~user_series.sql b/resources/db/patches/mysql/+2~user_series.sql similarity index 100% rename from resources/db/patches/mysql/+6~user_series.sql rename to resources/db/patches/mysql/+2~user_series.sql diff --git a/resources/db/patches/mysql/0201~videos.sql b/resources/db/patches/mysql/0201~videos.sql new file mode 100644 index 000000000..10f460c8d --- /dev/null +++ b/resources/db/patches/mysql/0201~videos.sql @@ -0,0 +1,3 @@ +# Alter videos table to add anidb id column + +ALTER IGNORE TABLE videos ADD COLUMN anidb MEDIUMINT(11) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'ID number for anidb site' AFTER started; diff --git a/resources/db/patches/mysql/0202~user_series.sql b/resources/db/patches/mysql/0202~user_series.sql new file mode 100644 index 000000000..95fd56902 --- /dev/null +++ b/resources/db/patches/mysql/0202~user_series.sql @@ -0,0 +1,13 @@ +# This patch will make the necessary changes to the user_series +# table to support the new videos implementation +# 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 +TRUNCATE TABLE userseries; + +# Change rageid column to new videos_id +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);