From 7d1886503dbbead47758fb43e3fb4bf2b0ec2b2c Mon Sep 17 00:00:00 2001 From: Darko Date: Thu, 28 May 2015 12:55:57 +0200 Subject: [PATCH] Add patches to newznab/db/ folder --- resources/db/patches/0001_tmux.sql | 3 + resources/db/patches/0002_tmux.sql | 11 + resources/db/patches/0004_tmux.sql | 3 + resources/db/patches/0005_releases.sql | 3 + resources/db/patches/0006_tmux.sql | 3 + resources/db/patches/0007_releases_tmux.sql | 4 + resources/db/patches/0008_releases.sql | 3 + resources/db/patches/0009_releases.sql | 2 + resources/db/patches/0010_releases.sql | 2 + resources/db/patches/0011_prehash.sql | 3 + resources/db/patches/0012_prehash.sql | 10 + resources/db/patches/0013_tmux.sql | 4 + resources/db/patches/0014_prehash.sql | 10 + resources/db/patches/0015_sharing.sql | 34 ++ resources/db/patches/0016_tmux.sql | 4 + resources/db/patches/0017_tmux.sql | 3 + resources/db/patches/0018_sharing.sql | 5 + resources/db/patches/0019_sharing.sql | 5 + resources/db/patches/0020_tmux.sql | 6 + resources/db/patches/0021_tmux.sql | 5 + resources/db/patches/0022_releases.sql | 3 + resources/db/patches/0023_tmux.sql | 3 + resources/db/patches/0024_tmux.sql | 3 + resources/db/patches/0025_tmux.sql | 3 + resources/db/patches/0026_tmux.sql | 9 + resources/db/patches/0027_prehash.sql | 9 + resources/db/patches/0028_tmux.sql | 3 + resources/db/patches/0029_releases.sql | 11 + resources/db/patches/0030_tmux.sql | 3 + resources/db/patches/0031_releases.sql | 4 + resources/db/patches/0032_releases.sql | 9 + resources/db/patches/0033_releases.sql | 11 + resources/db/patches/0034_tmux.sql | 5 + resources/db/patches/0035_prehash.sql | 16 + resources/db/patches/0036_tmux.sql | 3 + resources/db/patches/0037_tmux.sql | 3 + resources/db/patches/0038_releasesearch.sql | 25 + resources/db/patches/0039_prehash.sql | 5 + resources/db/patches/0040_tmux.sql | 3 + resources/db/patches/0041_predbhash.sql | 45 ++ resources/db/patches/0042_predbhash.sql | 4 + resources/db/patches/0043_prehash.sql | 3 + resources/db/patches/0044_releasecomment.sql | 5 + resources/db/patches/0045_prehash.sql | 3 + resources/db/patches/0046_releasecomment.sql | 7 + resources/db/patches/0047_users.sql | 5 + resources/db/patches/0049_site.sql | 3 + resources/db/patches/0050_category.sql | 93 ++++ resources/db/patches/0051_tmux.sql | 2 + resources/db/patches/0052~gamesinfo.sql | 24 + resources/db/patches/0053~site.sql | 2 + resources/db/patches/0054~releases.sql | 3 + resources/db/patches/0055~users.sql | 2 + resources/db/patches/0056~menu.sql | 2 + resources/db/patches/0057~releases.sql | 2 + resources/db/patches/0058~tmux.sql | 6 + resources/db/patches/0059~users.sql | 2 + resources/db/patches/0060~xxxinfo.sql | 27 + resources/db/patches/0061~releases.sql | 3 + resources/db/patches/0062~releases.sql | 5 + resources/db/patches/0063~site.sql | 2 + resources/db/patches/0064~site.sql | 2 + resources/db/patches/0065~users.sql | 4 + resources/db/patches/0066~genres.sql | 497 +++++++++++++++++++ resources/db/patches/0067~gamesinfo.sql | 5 + resources/db/patches/0068~xxxinfo.sql | 3 + resources/db/patches/0069~site.sql | 2 + resources/db/patches/0070~animetitles.sql | 2 + resources/db/patches/0071~site.sql | 2 + resources/db/patches/0072~site.sql | 24 + resources/db/patches/0073~releases.sql | 2 + resources/db/patches/0074~releases.sql | 2 + resources/db/patches/0075~site.sql | 2 + resources/db/patches/0078~site.sql | 51 ++ resources/db/patches/0079~site.sql | 2 + resources/db/patches/0080~site.sql | 4 + resources/db/patches/0081~movieinfo.sql | 2 + resources/db/patches/0082~tvrageepisodes.sql | 17 + resources/db/patches/0083~site.sql | 6 + resources/db/patches/0084~groups.sql | 3 + resources/db/patches/0085~site.sql | 2 + resources/db/patches/0086~category.sql | 2 + resources/db/patches/0087~site.sql | 6 + resources/db/patches/0088~site.sql | 3 + resources/db/patches/0089~site.sql | 2 + resources/db/patches/0090~bookinfo.sql | 2 + resources/db/patches/0091~releasesearch.sql | 15 + resources/db/patches/0092~bookinfo.sql | 3 + resources/db/patches/0093~anidb.sql | 70 +++ resources/db/patches/0094~site.sql | 5 + resources/db/patches/0095~releases.sql | 16 + resources/db/patches/0096~site.sql | 9 + resources/db/patches/0097~releases.sql | 3 + resources/db/patches/0098~tmux.sql | 4 + resources/db/patches/0099~releases.sql | 60 +++ resources/db/patches/0100~binaries.sql | 5 + resources/db/patches/0101~tmux.sql | 4 + resources/db/patches/0102~predb.sql | 2 + resources/db/patches/0103~site.sql | 7 + resources/db/patches/0104~releasecomment.sql | 4 + resources/db/patches/0105~site.sql | 3 + resources/db/patches/0106~category.sql | 2 + resources/db/patches/0107~prehash.sql | 3 + resources/db/patches/0108~category.sql | 3 + resources/db/patches/0109~category.sql | 2 + resources/db/patches/0110~releases.sql | 2 + resources/db/patches/0111~tmux.sql | 2 + resources/db/patches/0112~tmux.sql | 3 + resources/db/patches/0113~general.sql | 12 + resources/db/patches/0114~movieinfo.sql | 2 + resources/db/patches/0115~dnzb_downloads.sql | 13 + resources/db/patches/0116~site.sql | 3 + resources/db/patches/0117~blacklist.sql | 2 + resources/db/patches/0118~site.sql | 2 + resources/db/patches/0119~users.sql | 4 + resources/db/patches/0120~site.sql | 2 + resources/db/patches/0121~site.sql | 2 + 117 files changed, 1422 insertions(+) create mode 100644 resources/db/patches/0001_tmux.sql create mode 100644 resources/db/patches/0002_tmux.sql create mode 100644 resources/db/patches/0004_tmux.sql create mode 100644 resources/db/patches/0005_releases.sql create mode 100644 resources/db/patches/0006_tmux.sql create mode 100644 resources/db/patches/0007_releases_tmux.sql create mode 100644 resources/db/patches/0008_releases.sql create mode 100644 resources/db/patches/0009_releases.sql create mode 100644 resources/db/patches/0010_releases.sql create mode 100644 resources/db/patches/0011_prehash.sql create mode 100644 resources/db/patches/0012_prehash.sql create mode 100644 resources/db/patches/0013_tmux.sql create mode 100644 resources/db/patches/0014_prehash.sql create mode 100644 resources/db/patches/0015_sharing.sql create mode 100644 resources/db/patches/0016_tmux.sql create mode 100644 resources/db/patches/0017_tmux.sql create mode 100644 resources/db/patches/0018_sharing.sql create mode 100644 resources/db/patches/0019_sharing.sql create mode 100644 resources/db/patches/0020_tmux.sql create mode 100644 resources/db/patches/0021_tmux.sql create mode 100644 resources/db/patches/0022_releases.sql create mode 100644 resources/db/patches/0023_tmux.sql create mode 100644 resources/db/patches/0024_tmux.sql create mode 100644 resources/db/patches/0025_tmux.sql create mode 100644 resources/db/patches/0026_tmux.sql create mode 100644 resources/db/patches/0027_prehash.sql create mode 100644 resources/db/patches/0028_tmux.sql create mode 100644 resources/db/patches/0029_releases.sql create mode 100644 resources/db/patches/0030_tmux.sql create mode 100644 resources/db/patches/0031_releases.sql create mode 100644 resources/db/patches/0032_releases.sql create mode 100644 resources/db/patches/0033_releases.sql create mode 100644 resources/db/patches/0034_tmux.sql create mode 100644 resources/db/patches/0035_prehash.sql create mode 100644 resources/db/patches/0036_tmux.sql create mode 100644 resources/db/patches/0037_tmux.sql create mode 100644 resources/db/patches/0038_releasesearch.sql create mode 100644 resources/db/patches/0039_prehash.sql create mode 100644 resources/db/patches/0040_tmux.sql create mode 100644 resources/db/patches/0041_predbhash.sql create mode 100644 resources/db/patches/0042_predbhash.sql create mode 100644 resources/db/patches/0043_prehash.sql create mode 100644 resources/db/patches/0044_releasecomment.sql create mode 100644 resources/db/patches/0045_prehash.sql create mode 100644 resources/db/patches/0046_releasecomment.sql create mode 100644 resources/db/patches/0047_users.sql create mode 100644 resources/db/patches/0049_site.sql create mode 100644 resources/db/patches/0050_category.sql create mode 100644 resources/db/patches/0051_tmux.sql create mode 100644 resources/db/patches/0052~gamesinfo.sql create mode 100644 resources/db/patches/0053~site.sql create mode 100644 resources/db/patches/0054~releases.sql create mode 100644 resources/db/patches/0055~users.sql create mode 100644 resources/db/patches/0056~menu.sql create mode 100644 resources/db/patches/0057~releases.sql create mode 100644 resources/db/patches/0058~tmux.sql create mode 100644 resources/db/patches/0059~users.sql create mode 100644 resources/db/patches/0060~xxxinfo.sql create mode 100644 resources/db/patches/0061~releases.sql create mode 100644 resources/db/patches/0062~releases.sql create mode 100644 resources/db/patches/0063~site.sql create mode 100644 resources/db/patches/0064~site.sql create mode 100644 resources/db/patches/0065~users.sql create mode 100644 resources/db/patches/0066~genres.sql create mode 100644 resources/db/patches/0067~gamesinfo.sql create mode 100644 resources/db/patches/0068~xxxinfo.sql create mode 100644 resources/db/patches/0069~site.sql create mode 100644 resources/db/patches/0070~animetitles.sql create mode 100644 resources/db/patches/0071~site.sql create mode 100644 resources/db/patches/0072~site.sql create mode 100644 resources/db/patches/0073~releases.sql create mode 100644 resources/db/patches/0074~releases.sql create mode 100644 resources/db/patches/0075~site.sql create mode 100644 resources/db/patches/0078~site.sql create mode 100644 resources/db/patches/0079~site.sql create mode 100644 resources/db/patches/0080~site.sql create mode 100644 resources/db/patches/0081~movieinfo.sql create mode 100644 resources/db/patches/0082~tvrageepisodes.sql create mode 100644 resources/db/patches/0083~site.sql create mode 100644 resources/db/patches/0084~groups.sql create mode 100644 resources/db/patches/0085~site.sql create mode 100644 resources/db/patches/0086~category.sql create mode 100644 resources/db/patches/0087~site.sql create mode 100644 resources/db/patches/0088~site.sql create mode 100644 resources/db/patches/0089~site.sql create mode 100644 resources/db/patches/0090~bookinfo.sql create mode 100644 resources/db/patches/0091~releasesearch.sql create mode 100644 resources/db/patches/0092~bookinfo.sql create mode 100644 resources/db/patches/0093~anidb.sql create mode 100644 resources/db/patches/0094~site.sql create mode 100644 resources/db/patches/0095~releases.sql create mode 100644 resources/db/patches/0096~site.sql create mode 100644 resources/db/patches/0097~releases.sql create mode 100644 resources/db/patches/0098~tmux.sql create mode 100644 resources/db/patches/0099~releases.sql create mode 100644 resources/db/patches/0100~binaries.sql create mode 100644 resources/db/patches/0101~tmux.sql create mode 100644 resources/db/patches/0102~predb.sql create mode 100644 resources/db/patches/0103~site.sql create mode 100644 resources/db/patches/0104~releasecomment.sql create mode 100644 resources/db/patches/0105~site.sql create mode 100644 resources/db/patches/0106~category.sql create mode 100644 resources/db/patches/0107~prehash.sql create mode 100644 resources/db/patches/0108~category.sql create mode 100644 resources/db/patches/0109~category.sql create mode 100644 resources/db/patches/0110~releases.sql create mode 100644 resources/db/patches/0111~tmux.sql create mode 100644 resources/db/patches/0112~tmux.sql create mode 100644 resources/db/patches/0113~general.sql create mode 100644 resources/db/patches/0114~movieinfo.sql create mode 100644 resources/db/patches/0115~dnzb_downloads.sql create mode 100644 resources/db/patches/0116~site.sql create mode 100644 resources/db/patches/0117~blacklist.sql create mode 100644 resources/db/patches/0118~site.sql create mode 100644 resources/db/patches/0119~users.sql create mode 100644 resources/db/patches/0120~site.sql create mode 100644 resources/db/patches/0121~site.sql diff --git a/resources/db/patches/0001_tmux.sql b/resources/db/patches/0001_tmux.sql new file mode 100644 index 000000000..8de0a3a0f --- /dev/null +++ b/resources/db/patches/0001_tmux.sql @@ -0,0 +1,3 @@ +DELETE FROM `tmux` WHERE `setting` = 'releases_threaded'; + +UPDATE `tmux` set `value` = '1' where `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0002_tmux.sql b/resources/db/patches/0002_tmux.sql new file mode 100644 index 000000000..4a02cf8c8 --- /dev/null +++ b/resources/db/patches/0002_tmux.sql @@ -0,0 +1,11 @@ +DELETE FROM `tmux` WHERE `setting` = 'collections_kill'; +DELETE FROM `tmux` WHERE `setting` = 'sorter'; +DELETE FROM `tmux` WHERE `setting` = 'sorter_timer'; +DELETE FROM `tmux` WHERE `setting` = 'optimize'; +DELETE FROM `tmux` WHERE `setting` = 'optimize_timer'; +INSERT IGNORE INTO `tmux` (`setting`, `value`) VALUES ('sphinx', '0'), + ('sphinx_timer', '600'), + ('delete_parts', '0'), + ('delete_timer', '43200'); + +UPDATE `tmux` set `value` = '2' where `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0004_tmux.sql b/resources/db/patches/0004_tmux.sql new file mode 100644 index 000000000..42b29a7e1 --- /dev/null +++ b/resources/db/patches/0004_tmux.sql @@ -0,0 +1,3 @@ +INSERT IGNORE INTO `tmux` (`setting`, `value`) VALUES ('partrepair', 1); + +UPDATE `tmux` set `value` = '4' where `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0005_releases.sql b/resources/db/patches/0005_releases.sql new file mode 100644 index 000000000..39a2cb88c --- /dev/null +++ b/resources/db/patches/0005_releases.sql @@ -0,0 +1,3 @@ +ALTER TABLE `releases` DROP COLUMN `nzbstatus`; + +UPDATE `tmux` set `value` = '5' where `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0006_tmux.sql b/resources/db/patches/0006_tmux.sql new file mode 100644 index 000000000..5e6d12b05 --- /dev/null +++ b/resources/db/patches/0006_tmux.sql @@ -0,0 +1,3 @@ +INSERT IGNORE INTO `tmux` (`setting`, `value`) VALUES ('zippath', ''); + +UPDATE `tmux` set `value` = '6' where `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0007_releases_tmux.sql b/resources/db/patches/0007_releases_tmux.sql new file mode 100644 index 000000000..9866eb087 --- /dev/null +++ b/resources/db/patches/0007_releases_tmux.sql @@ -0,0 +1,4 @@ +ALTER TABLE `releases` ADD `jpgstatus` TINYINT(1) NOT NULL DEFAULT 0; +INSERT IGNORE INTO `tmux` (`setting`, `value`) VALUES ('processjpg', 0); + +UPDATE `tmux` set `value` = '7' where `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0008_releases.sql b/resources/db/patches/0008_releases.sql new file mode 100644 index 000000000..df3af6e57 --- /dev/null +++ b/resources/db/patches/0008_releases.sql @@ -0,0 +1,3 @@ +ALTER TABLE `releases` ADD `prehashid` INT(12) NULL DEFAULT NULL; + +UPDATE `tmux` set `value` = '8' where `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0009_releases.sql b/resources/db/patches/0009_releases.sql new file mode 100644 index 000000000..912b67608 --- /dev/null +++ b/resources/db/patches/0009_releases.sql @@ -0,0 +1,2 @@ +ALTER TABLE `releases` CHANGE COLUMN `prehashid` `prehashid` INT UNSIGNED NOT NULL DEFAULT '0'; +UPDATE `tmux` set `value` = '9' where `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0010_releases.sql b/resources/db/patches/0010_releases.sql new file mode 100644 index 000000000..a342cca19 --- /dev/null +++ b/resources/db/patches/0010_releases.sql @@ -0,0 +1,2 @@ +ALTER TABLE `releases` ADD INDEX `ix_releases_prehashid_searchname` (`prehashid`, `searchname`); +UPDATE `tmux` set `value` = '10' where `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0011_prehash.sql b/resources/db/patches/0011_prehash.sql new file mode 100644 index 000000000..d3b69d8e1 --- /dev/null +++ b/resources/db/patches/0011_prehash.sql @@ -0,0 +1,3 @@ +ALTER TABLE `prehash` ADD INDEX `ix_prehash_size` (`size`); +ALTER TABLE `prehash` ADD INDEX `ix_prehash_category` (`category`); +UPDATE `tmux` set `value` = '11' where `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0012_prehash.sql b/resources/db/patches/0012_prehash.sql new file mode 100644 index 000000000..777c03ccb --- /dev/null +++ b/resources/db/patches/0012_prehash.sql @@ -0,0 +1,10 @@ +/* Is this pre nuked? 0 no 1 yes 2 un nuked 3 mod nuked */ +ALTER TABLE prehash ADD COLUMN nuked TINYINT(1) NOT NULL DEFAULT '0'; + +/* If this pre is nuked, what is the reason? */ +ALTER TABLE prehash ADD COLUMN nukereason VARCHAR(255) NULL; + +/* How many files does this pre have ? */ +ALTER TABLE prehash ADD COLUMN files VARCHAR(50) NULL; + +UPDATE tmux SET value = '12' WHERE setting = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0013_tmux.sql b/resources/db/patches/0013_tmux.sql new file mode 100644 index 000000000..3a88e5f8f --- /dev/null +++ b/resources/db/patches/0013_tmux.sql @@ -0,0 +1,4 @@ +INSERT IGNORE INTO tmux (setting, value) VALUE ('scrape_cz', 0); +INSERT IGNORE INTO tmux (setting, value) VALUE ('scrape_efnet', 0); + +UPDATE tmux SET value = '13' WHERE setting = 'sqlpatch'; diff --git a/resources/db/patches/0014_prehash.sql b/resources/db/patches/0014_prehash.sql new file mode 100644 index 000000000..1ab9336ba --- /dev/null +++ b/resources/db/patches/0014_prehash.sql @@ -0,0 +1,10 @@ +/* Drop the adddate index */ +ALTER TABLE prehash DROP INDEX ix_prehash_adddate; + +/* Drop the adddate column */ +ALTER TABLE prehash DROP COLUMN adddate; + +/* Use tmux table to keep the last pre time (unixtime) */ +INSERT INTO tmux (setting, value) VALUES ('lastpretime', '0'); + +UPDATE tmux SET value = '14' WHERE setting = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0015_sharing.sql b/resources/db/patches/0015_sharing.sql new file mode 100644 index 000000000..beffbb203 --- /dev/null +++ b/resources/db/patches/0015_sharing.sql @@ -0,0 +1,34 @@ +DROP TABLE IF EXISTS sharing_sites; +CREATE TABLE sharing_sites ( + id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, + site_name VARCHAR(255) NOT NULL DEFAULT '', + site_guid VARCHAR(40) NOT NULL DEFAULT '', + last_time DATETIME DEFAULT NULL, + first_time DATETIME DEFAULT NULL, + enabled TINYINT(1) NOT NULL DEFAULT '0', + comments MEDIUMINT UNSIGNED NOT NULL DEFAULT '0', + PRIMARY KEY (id) +) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci AUTO_INCREMENT=1 ; + +DROP TABLE IF EXISTS sharing; +CREATE TABLE sharing ( + site_guid VARCHAR(40) NOT NULL DEFAULT '', + site_name VARCHAR(255) NOT NULL DEFAULT '', + enabled TINYINT(1) NOT NULL DEFAULT '0', + posting TINYINT(1) NOT NULL DEFAULT '0', + start_position TINYINT(1) NOT NULL DEFAULT '0', + fetching TINYINT(1) NOT NULL DEFAULT '1', + auto_enable TINYINT(1) NOT NULL DEFAULT '1', + hide_users TINYINT(1) NOT NULL DEFAULT '1', + last_article BIGINT UNSIGNED NOT NULL DEFAULT '0', + max_push MEDIUMINT UNSIGNED NOT NULL DEFAULT '40', + max_pull INT UNSIGNED NOT NULL DEFAULT '200', + PRIMARY KEY (site_guid) +) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ; + +ALTER TABLE releasecomment ADD COLUMN shared TINYINT(1) NOT NULL DEFAULT '1'; +ALTER TABLE releasecomment ADD COLUMN shareid VARCHAR(40) NOT NULL DEFAULT ''; +ALTER TABLE releasecomment ADD COLUMN siteid VARCHAR(40) NOT NULL DEFAULT ''; +ALTER TABLE releasecomment ADD COLUMN nzb_guid VARCHAR(32) NOT NULL DEFAULT ''; + +UPDATE tmux SET value = '15' WHERE setting = 'sqlpatch'; diff --git a/resources/db/patches/0016_tmux.sql b/resources/db/patches/0016_tmux.sql new file mode 100644 index 000000000..309827d83 --- /dev/null +++ b/resources/db/patches/0016_tmux.sql @@ -0,0 +1,4 @@ +INSERT IGNORE INTO tmux (setting, value) VALUE ('nntpretries', '10'); +INSERT IGNORE INTO tmux (setting, value) VALUE ('alternate_nntp', '0'); + +UPDATE tmux SET value = '16' WHERE setting = 'sqlpatch'; diff --git a/resources/db/patches/0017_tmux.sql b/resources/db/patches/0017_tmux.sql new file mode 100644 index 000000000..d8a05e83a --- /dev/null +++ b/resources/db/patches/0017_tmux.sql @@ -0,0 +1,3 @@ +INSERT IGNORE INTO tmux (setting, value) VALUE ('sharing_timer', '60'); + +UPDATE tmux SET value = '17' WHERE setting = 'sqlpatch'; diff --git a/resources/db/patches/0018_sharing.sql b/resources/db/patches/0018_sharing.sql new file mode 100644 index 000000000..4987d9178 --- /dev/null +++ b/resources/db/patches/0018_sharing.sql @@ -0,0 +1,5 @@ +ALTER TABLE sharing ADD COLUMN max_download MEDIUMINT UNSIGNED NOT NULL DEFAULT '150'; + +UPDATE sharing SET max_pull = 20000; + +UPDATE tmux SET value = '18' WHERE setting = 'sqlpatch'; diff --git a/resources/db/patches/0019_sharing.sql b/resources/db/patches/0019_sharing.sql new file mode 100644 index 000000000..31bbd6f19 --- /dev/null +++ b/resources/db/patches/0019_sharing.sql @@ -0,0 +1,5 @@ +UPDATE releasecomment SET username = (SELECT username FROM users WHERE users.id = releasecomment.userid); + +DELETE FROM users WHERE email = 'sharing@nZEDb.com' AND role = 0; + +UPDATE tmux SET value = '19' WHERE setting = 'sqlpatch'; diff --git a/resources/db/patches/0020_tmux.sql b/resources/db/patches/0020_tmux.sql new file mode 100644 index 000000000..d5ef2b670 --- /dev/null +++ b/resources/db/patches/0020_tmux.sql @@ -0,0 +1,6 @@ +DELETE FROM `tmux` WHERE `setting` = 'delete_parts'; +DELETE FROM `tmux` WHERE `setting` = 'delete_timer'; + + + +UPDATE `tmux` set `value` = '20' where `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0021_tmux.sql b/resources/db/patches/0021_tmux.sql new file mode 100644 index 000000000..e85265b97 --- /dev/null +++ b/resources/db/patches/0021_tmux.sql @@ -0,0 +1,5 @@ +DELETE FROM `tmux` WHERE `setting` = 'alternate_nntp'; + + + +UPDATE `tmux` set `value` = '21' where `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0022_releases.sql b/resources/db/patches/0022_releases.sql new file mode 100644 index 000000000..83a028d39 --- /dev/null +++ b/resources/db/patches/0022_releases.sql @@ -0,0 +1,3 @@ +ALTER TABLE `releases` ADD INDEX `ix_releases_releasenfoID` (`releasenfoid`); + +UPDATE `tmux` set `value` = '22' where `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0023_tmux.sql b/resources/db/patches/0023_tmux.sql new file mode 100644 index 000000000..9e1d36d31 --- /dev/null +++ b/resources/db/patches/0023_tmux.sql @@ -0,0 +1,3 @@ +INSERT IGNORE INTO tmux (setting, value) VALUE ('fanarttvkey', ''); + +UPDATE tmux SET value = '23' WHERE setting = 'sqlpatch'; diff --git a/resources/db/patches/0024_tmux.sql b/resources/db/patches/0024_tmux.sql new file mode 100644 index 000000000..f93fc6039 --- /dev/null +++ b/resources/db/patches/0024_tmux.sql @@ -0,0 +1,3 @@ +INSERT IGNORE INTO tmux (setting, value) VALUE ('imdburl', '0'); + +UPDATE tmux SET value = '24' WHERE setting = 'sqlpatch'; diff --git a/resources/db/patches/0025_tmux.sql b/resources/db/patches/0025_tmux.sql new file mode 100644 index 000000000..175d3c8ca --- /dev/null +++ b/resources/db/patches/0025_tmux.sql @@ -0,0 +1,3 @@ +INSERT IGNORE INTO tmux (setting, value) VALUE ('yydecoderpath', ''); + +UPDATE tmux SET value = '25' WHERE setting = 'sqlpatch'; diff --git a/resources/db/patches/0026_tmux.sql b/resources/db/patches/0026_tmux.sql new file mode 100644 index 000000000..aa39cae34 --- /dev/null +++ b/resources/db/patches/0026_tmux.sql @@ -0,0 +1,9 @@ +INSERT IGNORE INTO tmux (setting, value) VALUE ('ffmpeg_duration', '5'); +INSERT IGNORE INTO tmux (setting, VALUE) VALUE ('ffmpeg_image_time', '5'); +INSERT IGNORE INTO tmux (setting, value) VALUE ('processvideos', '0'); + +ALTER TABLE `releases` ADD `proc_pp` TINYINT(1) NOT NULL DEFAULT 0; +ALTER TABLE `releases` ADD `videostatus` TINYINT(1) NOT NULL DEFAULT 0; +ALTER TABLE `releases` ADD `audiostatus` TINYINT(1) NOT NULL DEFAULT 0; + +UPDATE tmux SET value = '26' WHERE setting = 'sqlpatch'; diff --git a/resources/db/patches/0027_prehash.sql b/resources/db/patches/0027_prehash.sql new file mode 100644 index 000000000..6e0a1ab49 --- /dev/null +++ b/resources/db/patches/0027_prehash.sql @@ -0,0 +1,9 @@ +DELETE FROM prehash +WHERE MD5(title) != MD5; +ALTER TABLE prehash ADD COLUMN sha1 VARCHAR(40) NOT NULL DEFAULT ''; +ALTER TABLE prehash MODIFY COLUMN md5 VARCHAR(32) NOT NULL DEFAULT ''; + +UPDATE prehash SET sha1 = sha1(title); +CREATE UNIQUE INDEX ix_prehash_sha1 ON prehash(sha1); + +UPDATE tmux SET value = '27' WHERE setting = 'sqlpatch'; diff --git a/resources/db/patches/0028_tmux.sql b/resources/db/patches/0028_tmux.sql new file mode 100644 index 000000000..acc51a8ee --- /dev/null +++ b/resources/db/patches/0028_tmux.sql @@ -0,0 +1,3 @@ +INSERT IGNORE INTO tmux (setting, value) VALUE ('bins_kill_timer', '0'); + +UPDATE tmux SET value = '28' WHERE setting = 'sqlpatch'; diff --git a/resources/db/patches/0029_releases.sql b/resources/db/patches/0029_releases.sql new file mode 100644 index 000000000..b7cb1a3fe --- /dev/null +++ b/resources/db/patches/0029_releases.sql @@ -0,0 +1,11 @@ +ALTER TABLE `releases` ADD COLUMN `nzbstatus` TINYINT(1) NOT NULL DEFAULT 1; +ALTER TABLE `releases` ADD COLUMN `nzb_guid` VARCHAR(50) NULL; +ALTER TABLE `releases` DROP INDEX `ix_releases_status`; +ALTER TABLE `releases` ADD INDEX `ix_releases_status` (`nzbstatus`, `iscategorized`, `isrenamed`, `nfostatus`, `ishashed`, `passwordstatus`, `dehashstatus`, `releasenfoid`, `musicinfoid`, `consoleinfoid`, `bookinfoid`, `haspreview`, `categoryid`, `imdbid`, `rageid`); +CREATE INDEX `ix_releases_nzb_guid` ON `releases` (`nzb_guid`); + +UPDATE `releases` SET nzbstatus = 1 WHERE nzbstatus = 0; + + + +UPDATE `tmux` set `value` = '29' where `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0030_tmux.sql b/resources/db/patches/0030_tmux.sql new file mode 100644 index 000000000..5dd7ee9b3 --- /dev/null +++ b/resources/db/patches/0030_tmux.sql @@ -0,0 +1,3 @@ +UPDATE `tmux` SET VALUE = 'http://reqid.nzedb.com/index.php?reqid=[REQUEST_ID]&group=[GROUP_NM]' WHERE `setting` = 'request_url'; + +UPDATE `tmux` set `value` = '30' where `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0031_releases.sql b/resources/db/patches/0031_releases.sql new file mode 100644 index 000000000..e6480beca --- /dev/null +++ b/resources/db/patches/0031_releases.sql @@ -0,0 +1,4 @@ +ALTER TABLE `releases` DROP COLUMN `nzb_guid`; +ALTER TABLE `releases` DROP INDEX `ix_releases_nzb_guid`; + +UPDATE `tmux` set `value` = '31' where `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0032_releases.sql b/resources/db/patches/0032_releases.sql new file mode 100644 index 000000000..366a02603 --- /dev/null +++ b/resources/db/patches/0032_releases.sql @@ -0,0 +1,9 @@ +DROP TRIGGER IF EXISTS check_insert; +DROP TRIGGER IF EXISTS check_update; + + +CREATE TRIGGER check_insert BEFORE INSERT ON releases FOR EACH ROW BEGIN IF NEW.searchname REGEXP '[a-fA-F0-9]{32}' OR NEW.name REGEXP '[a-fA-F0-9]{32}' THEN SET NEW.ishashed = 1;ELSEIF NEW.name REGEXP '^\[ ?([[:digit:]]{4,6}) ?\]|^REQ\s*([[:digit:]]{4,6})|^([[:digit:]]{4,6})-[[:digit:]]{1}\\[' THEN SET NEW.isrequestid = 1;ELSEIF NEW.releasenfoid = 0 THEN SET NEW.nfostatus = -1; END IF; END; +CREATE TRIGGER check_update BEFORE UPDATE ON releases FOR EACH ROW BEGIN IF NEW.searchname REGEXP '[a-fA-F0-9]{32}' OR NEW.name REGEXP '[a-fA-F0-9]{32}' THEN SET NEW.ishashed = 1;ELSEIF NEW.name REGEXP '^\[ ?([[:digit:]]{4,6}) ?\]|^REQ\s*([[:digit:]]{4,6})|^([[:digit:]]{4,6})-[[:digit:]]{1}\\[' THEN SET NEW.isrequestid = 1;ELSEIF NEW.releasenfoid = 0 THEN SET NEW.nfostatus = -1; END IF; END; + + +UPDATE `tmux` set `value` = '32' where `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0033_releases.sql b/resources/db/patches/0033_releases.sql new file mode 100644 index 000000000..e984cbf24 --- /dev/null +++ b/resources/db/patches/0033_releases.sql @@ -0,0 +1,11 @@ +DROP TRIGGER IF EXISTS check_insert; +DROP TRIGGER IF EXISTS check_update; + +CREATE TRIGGER check_insert BEFORE INSERT ON releases FOR EACH ROW BEGIN IF NEW.searchname REGEXP '[a-fA-F0-9]{32}' OR NEW.name REGEXP '[a-fA-F0-9]{32}' THEN SET NEW.ishashed = 1;ELSEIF NEW.name REGEXP '^\\[ ?([[:digit:]]{4,6}) ?\\]|^REQ\s*([[:digit:]]{4,6})|^([[:digit:]]{4,6})-[[:digit:]]{1}\\[' THEN SET NEW.isrequestid = 1;ELSEIF NEW.releasenfoid = 0 THEN SET NEW.nfostatus = -1; END IF; END; +CREATE TRIGGER check_update BEFORE UPDATE ON releases FOR EACH ROW BEGIN IF NEW.searchname REGEXP '[a-fA-F0-9]{32}' OR NEW.name REGEXP '[a-fA-F0-9]{32}' THEN SET NEW.ishashed = 1;ELSEIF NEW.name REGEXP '^\\[ ?([[:digit:]]{4,6}) ?\\]|^REQ\s*([[:digit:]]{4,6})|^([[:digit:]]{4,6})-[[:digit:]]{1}\\[' THEN SET NEW.isrequestid = 1;ELSEIF NEW.releasenfoid = 0 THEN SET NEW.nfostatus = -1; END IF; END; + +UPDATE releases set isrequestid = 1 +WHERE name REGEXP '^\\[ ?([[:digit:]]{4,6}) ?\\]|^REQ\s*([[:digit:]]{4,6})|^([[:digit:]]{4,6})-[[:digit:]]{1}\\[' +AND isrequestid = 0; + +UPDATE `tmux` set `value` = '33' where `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0034_tmux.sql b/resources/db/patches/0034_tmux.sql new file mode 100644 index 000000000..5f95fbfa8 --- /dev/null +++ b/resources/db/patches/0034_tmux.sql @@ -0,0 +1,5 @@ +DELETE FROM `tmux` WHERE `setting` = 'scrape_cz'; +DELETE FROM `tmux` WHERE `setting` = 'scrape_efnet'; +INSERT IGNORE INTO `tmux` (setting, value) VALUE ('scrape', '0'); + +UPDATE `tmux` SET value = '34' WHERE `setting` = 'sqlpatch'; diff --git a/resources/db/patches/0035_prehash.sql b/resources/db/patches/0035_prehash.sql new file mode 100644 index 000000000..42595436b --- /dev/null +++ b/resources/db/patches/0035_prehash.sql @@ -0,0 +1,16 @@ +ALTER TABLE `prehash` ADD COLUMN `filename` varchar(255) NOT NULL DEFAULT ''; +ALTER TABLE `prehash` ADD INDEX `ix_prehash_filename` (`filename`); +ALTER TABLE `releasefiles` ADD COLUMN `ishashed` tinyint(1) NOT NULL DEFAULT '0' AFTER `size`; +ALTER TABLE `releasefiles` ADD INDEX `ix_releasefiles_ishashed` (`ishashed`); + +DROP TRIGGER IF EXISTS check_rfinsert; +DROP TRIGGER IF EXISTS check_rfupdate; + + +CREATE TRIGGER check_rfinsert BEFORE INSERT ON releasefiles FOR EACH ROW BEGIN IF NEW.name REGEXP '[a-fA-F0-9]{32}' THEN SET NEW.ishashed = 1; END IF; END; +CREATE TRIGGER check_rfupdate BEFORE UPDATE ON releasefiles FOR EACH ROW BEGIN IF NEW.name REGEXP '[a-fA-F0-9]{32}' THEN SET NEW.ishashed = 1; END IF; END; + + +UPDATE `releasefiles` SET ishashed = 1 WHERE name REGEXP '[a-fA-F0-9]{32}'; + +UPDATE `tmux` SET value = '35' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0036_tmux.sql b/resources/db/patches/0036_tmux.sql new file mode 100644 index 000000000..ccfc891fe --- /dev/null +++ b/resources/db/patches/0036_tmux.sql @@ -0,0 +1,3 @@ +DELETE FROM `tmux` WHERE `setting` = 'colors'; + +UPDATE `tmux` SET value = '36' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0037_tmux.sql b/resources/db/patches/0037_tmux.sql new file mode 100644 index 000000000..b0d053408 --- /dev/null +++ b/resources/db/patches/0037_tmux.sql @@ -0,0 +1,3 @@ +INSERT IGNORE INTO tmux (setting, value) VALUE ('run_sharing', '0'); + +UPDATE `tmux` SET value = '37' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0038_releasesearch.sql b/resources/db/patches/0038_releasesearch.sql new file mode 100644 index 000000000..945470adf --- /dev/null +++ b/resources/db/patches/0038_releasesearch.sql @@ -0,0 +1,25 @@ +DROP TABLE IF EXISTS releasesearch; +CREATE TABLE releasesearch ( + id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, + releaseid INT(11) UNSIGNED NOT NULL, + guid VARCHAR(50) NOT NULL, + name VARCHAR(255) NOT NULL DEFAULT '', + searchname VARCHAR(255) NOT NULL DEFAULT '', + PRIMARY KEY (id) +) ENGINE =MyISAM DEFAULT CHARSET =utf8 COLLATE =utf8_unicode_ci AUTO_INCREMENT =1; + +CREATE FULLTEXT INDEX ix_releasesearch_name_searchname_ft ON releasesearch (name, searchname); +CREATE INDEX ix_releasesearch_releaseid ON releasesearch (releaseid); +CREATE INDEX ix_releasesearch_guid ON releasesearch (guid); + +ALTER TABLE `releases` +ADD `proc_filenames` BIT NOT NULL DEFAULT 0; + + +CREATE TRIGGER insert_search AFTER INSERT ON releases FOR EACH ROW BEGIN INSERT INTO releasesearch (releaseid, guid, name, searchname) VALUES (NEW.id, NEW.guid, NEW.name, NEW.searchname);END; +CREATE TRIGGER update_search AFTER UPDATE ON releases FOR EACH ROW BEGIN IF NEW.guid != OLD.guid THEN UPDATE releasesearch SET guid = NEW.guid WHERE releaseid = OLD.id; END IF; IF NEW.name != OLD.name THEN UPDATE releasesearch SET name = NEW.name WHERE releaseid = OLD.id; END IF; IF NEW.searchname != OLD.searchname THEN UPDATE releasesearch SET searchname = NEW.searchname WHERE releaseid = OLD.id; END IF;END; +CREATE TRIGGER delete_search AFTER DELETE ON releases FOR EACH ROW BEGIN DELETE FROM releasesearch WHERE releaseid = OLD.id;END; + + +UPDATE `tmux` SET value = '38' WHERE `setting` = 'sqlpatch'; + diff --git a/resources/db/patches/0039_prehash.sql b/resources/db/patches/0039_prehash.sql new file mode 100644 index 000000000..99a472b83 --- /dev/null +++ b/resources/db/patches/0039_prehash.sql @@ -0,0 +1,5 @@ +ALTER TABLE prehash ADD COLUMN searched tinyint(1) NOT NULL DEFAULT 0; +ALTER TABLE prehash ADD INDEX ix_prehash_searched (searched); +ALTER TABLE releases DROP COLUMN proc_filenames; + +UPDATE `tmux` SET value = '39' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0040_tmux.sql b/resources/db/patches/0040_tmux.sql new file mode 100644 index 000000000..612bcc906 --- /dev/null +++ b/resources/db/patches/0040_tmux.sql @@ -0,0 +1,3 @@ +INSERT IGNORE INTO tmux (setting, value) VALUE ('lastpretime', '0'); + +UPDATE `tmux` SET value = '40' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0041_predbhash.sql b/resources/db/patches/0041_predbhash.sql new file mode 100644 index 000000000..12bb9c006 --- /dev/null +++ b/resources/db/patches/0041_predbhash.sql @@ -0,0 +1,45 @@ +DROP TABLE IF EXISTS predbhash; +CREATE TABLE predbhash ( + pre_id INT(11) UNSIGNED NOT NULL DEFAULT 0, + hashes VARCHAR(512) NOT NULL DEFAULT '', + PRIMARY KEY (pre_id) +) + ENGINE =MYISAM + ROW_FORMAT = DYNAMIC + DEFAULT CHARSET =utf8mb4 + COLLATE =utf8mb4_unicode_ci; + +INSERT INTO predbhash (pre_id, hashes) (SELECT + id, + CONCAT_WS(',', MD5(title), MD5(MD5(title)), SHA1(title)) + FROM prehash); + +CREATE FULLTEXT INDEX ix_predbhash_hashes_ft ON predbhash (hashes); +ALTER IGNORE TABLE predbhash ADD UNIQUE INDEX ix_predbhash_hashes (hashes(32)); + +DROP TRIGGER IF EXISTS insert_hashes; + + +CREATE TRIGGER insert_hashes AFTER INSERT ON prehash FOR EACH ROW BEGIN INSERT INTO predbhash (pre_id, hashes) +VALUES (NEW.id, CONCAT_WS(',', MD5(NEW.title), MD5(MD5(NEW.title)), SHA1(NEW.title))); +END; + + + +DROP TRIGGER IF EXISTS update_hashes; + + +CREATE TRIGGER update_hashes AFTER UPDATE ON prehash FOR EACH ROW BEGIN IF NEW.title != OLD.title +THEN UPDATE predbhash +SET hashes = CONCAT_WS(',', MD5(NEW.title), MD5(MD5(NEW.title)), SHA1(NEW.title)); END IF; +END; + +DROP TRIGGER IF EXISTS delete_hashes; + + +CREATE TRIGGER delete_hashes AFTER DELETE ON prehash FOR EACH ROW BEGIN DELETE FROM predbhash +WHERE pre_id = OLD.id; +END; + + +UPDATE `tmux` SET value = '41' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0042_predbhash.sql b/resources/db/patches/0042_predbhash.sql new file mode 100644 index 000000000..08aab0dc7 --- /dev/null +++ b/resources/db/patches/0042_predbhash.sql @@ -0,0 +1,4 @@ +DROP TRIGGER IF EXISTS update_hashes; + +CREATE TRIGGER update_hashes AFTER UPDATE ON prehash FOR EACH ROW BEGIN IF NEW.title != OLD.title THEN UPDATE predbhash SET hashes = CONCAT_WS(',', MD5(NEW.title), MD5(MD5(NEW.title)), SHA1(NEW.title)) WHERE pre_id = OLD.id;END IF;END; +UPDATE `tmux` SET value = '42' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0043_prehash.sql b/resources/db/patches/0043_prehash.sql new file mode 100644 index 000000000..98c0d8486 --- /dev/null +++ b/resources/db/patches/0043_prehash.sql @@ -0,0 +1,3 @@ +ALTER TABLE prehash DROP md5; +ALTER TABLE prehash DROP sha1; +UPDATE `tmux` SET value = '43' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0044_releasecomment.sql b/resources/db/patches/0044_releasecomment.sql new file mode 100644 index 000000000..aa4733108 --- /dev/null +++ b/resources/db/patches/0044_releasecomment.sql @@ -0,0 +1,5 @@ +ALTER TABLE releasecomment MODIFY text varchar(255); +DROP INDEX ix_releasecomment_text_releaseID ON releasecomment; +CREATE UNIQUE INDEX ix_releasecomment_text_releaseID ON releasecomment (text, releaseid); +UPDATE `tmux` SET value = '44' WHERE `setting` = 'sqlpatch'; + diff --git a/resources/db/patches/0045_prehash.sql b/resources/db/patches/0045_prehash.sql new file mode 100644 index 000000000..4137cfa0b --- /dev/null +++ b/resources/db/patches/0045_prehash.sql @@ -0,0 +1,3 @@ +ALTER TABLE prehash DROP INDEX ix_prehash_title; +ALTER IGNORE TABLE prehash ADD UNIQUE INDEX ix_prehash_title (title); +UPDATE `tmux` SET value = '45' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0046_releasecomment.sql b/resources/db/patches/0046_releasecomment.sql new file mode 100644 index 000000000..881821860 --- /dev/null +++ b/resources/db/patches/0046_releasecomment.sql @@ -0,0 +1,7 @@ +ALTER TABLE releasecomment ADD COLUMN text_hash VARCHAR(32) NOT NULL DEFAULT ''; +DROP TRIGGER IF EXISTS insert_MD5; +CREATE TRIGGER insert_MD5 BEFORE INSERT ON releasecomment FOR EACH ROW SET NEW.text_hash = MD5(NEW.text); +UPDATE releasecomment +SET text_hash = MD5(text); +ALTER IGNORE TABLE releasecomment ADD UNIQUE INDEX ix_releasecomment_hash_releaseID (text_hash, releaseid); +UPDATE `tmux` SET `value` = '46' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0047_users.sql b/resources/db/patches/0047_users.sql new file mode 100644 index 000000000..6a45ae026 --- /dev/null +++ b/resources/db/patches/0047_users.sql @@ -0,0 +1,5 @@ +ALTER TABLE users ADD COLUMN queuetype TINYINT(1) NOT NULL DEFAULT 1; +/* Add a column to pick between Sab and NZBGet. */ + + +UPDATE `tmux` SET `value` = '47' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0049_site.sql b/resources/db/patches/0049_site.sql new file mode 100644 index 000000000..e728599ae --- /dev/null +++ b/resources/db/patches/0049_site.sql @@ -0,0 +1,3 @@ +INSERT INTO `site` (`setting`, `value`) VALUES ('categorizeforeign', '1'); +INSERT INTO `site` (`setting`, `value`) VALUES ('catwebdl', '0'); +UPDATE `tmux` SET `value` = '49' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0050_category.sql b/resources/db/patches/0050_category.sql new file mode 100644 index 000000000..4575ba3ad --- /dev/null +++ b/resources/db/patches/0050_category.sql @@ -0,0 +1,93 @@ +DROP TABLE IF EXISTS `category`; +CREATE TABLE category +( + `id` INT PRIMARY KEY NOT NULL AUTO_INCREMENT, + `title` VARCHAR(255) NOT NULL, + `parentid` INT NULL, + `status` INT NOT NULL DEFAULT '1', + `minsizetoformrelease` BIGINT UNSIGNED NOT NULL DEFAULT '0', + `maxsizetoformrelease` BIGINT UNSIGNED NOT NULL DEFAULT '0', + `description` VARCHAR(255) NULL, + `disablepreview` TINYINT(1) NOT NULL DEFAULT '0' +) + ENGINE =INNODB + DEFAULT CHARACTER SET utf8 + COLLATE utf8_unicode_ci + AUTO_INCREMENT =100000; + +INSERT INTO category (id, title) VALUES (1000, 'Console'); +INSERT INTO category (id, title) VALUES (2000, 'Movies'); +INSERT INTO category (id, title) VALUES (3000, 'Audio'); +INSERT INTO category (id, title) VALUES (4000, 'PC'); +INSERT INTO category (id, title) VALUES (5000, 'TV'); +INSERT INTO category (id, title) VALUES (6000, 'XXX'); +INSERT INTO category (id, title) VALUES (7000, 'Books'); +INSERT INTO category (id, title) VALUES (8000, 'Other'); + +INSERT INTO category (id, title, parentid) VALUES (1010, 'NDS', 1000); +INSERT INTO category (id, title, parentid) VALUES (1020, 'PSP', 1000); +INSERT INTO category (id, title, parentid) VALUES (1030, 'Wii', 1000); +INSERT INTO category (id, title, parentid) VALUES (1040, 'Xbox', 1000); +INSERT INTO category (id, title, parentid) VALUES (1050, 'Xbox 360', 1000); +INSERT INTO category (id, title, parentid) VALUES (1060, 'WiiWare/VC', 1000); +INSERT INTO category (id, title, parentid) VALUES (1070, 'XBOX 360 DLC', 1000); +INSERT INTO category (id, title, parentid) VALUES (1080, 'PS3', 1000); +INSERT INTO category (id, title, parentid) VALUES (1090, 'Other', 1000); +INSERT INTO category (id, title, parentid) VALUES (1110, '3DS', 1000); +INSERT INTO category (id, title, parentid) VALUES (1120, 'PS Vita', 1000); +INSERT INTO category (id, title, parentid) VALUES (1130, 'WiiU', 1000); +INSERT INTO category (id, title, parentid) VALUES (1140, 'Xbox One', 1000); +INSERT INTO category (id, title, parentid) VALUES (1180, 'PS4', 1000); + +INSERT INTO category (id, title, parentid) VALUES (2010, 'Foreign', 2000); +INSERT INTO category (id, title, parentid) VALUES (2020, 'Other', 2000); +INSERT INTO category (id, title, parentid) VALUES (2030, 'SD', 2000); +INSERT INTO category (id, title, parentid) VALUES (2040, 'HD', 2000); +INSERT INTO category (id, title, parentid) VALUES (2050, '3D', 2000); +INSERT INTO category (id, title, parentid) VALUES (2060, 'BluRay', 2000); +INSERT INTO category (id, title, parentid) VALUES (2070, 'DVD', 2000); +INSERT INTO category (id, title, parentid) VALUES (2080, 'WEB-DL', 2000); + +INSERT INTO category (id, title, parentid) VALUES (3010, 'MP3', 3000); +INSERT INTO category (id, title, parentid) VALUES (3020, 'Video', 3000); +INSERT INTO category (id, title, parentid) VALUES (3030, 'Audiobook', 3000); +INSERT INTO category (id, title, parentid) VALUES (3040, 'Lossless', 3000); +INSERT INTO category (id, title, parentid) VALUES (3050, 'Other', 3000); +INSERT INTO category (id, title, parentid) VALUES (3060, 'Foreign', 3000); + +INSERT INTO category (id, title, parentid) VALUES (4010, '0day', 4000); +INSERT INTO category (id, title, parentid) VALUES (4020, 'ISO', 4000); +INSERT INTO category (id, title, parentid) VALUES (4030, 'Mac', 4000); +INSERT INTO category (id, title, parentid) VALUES (4040, 'Mobile-Other', 4000); +INSERT INTO category (id, title, parentid) VALUES (4050, 'Games', 4000); +INSERT INTO category (id, title, parentid) VALUES (4060, 'Mobile-iOS', 4000); +INSERT INTO category (id, title, parentid) VALUES (4070, 'Mobile-Android', 4000); + +INSERT INTO category (id, title, parentid) VALUES (5010, 'WEB-DL', 5000); +INSERT INTO category (id, title, parentid) VALUES (5020, 'Foreign', 5000); +INSERT INTO category (id, title, parentid) VALUES (5030, 'SD', 5000); +INSERT INTO category (id, title, parentid) VALUES (5040, 'HD', 5000); +INSERT INTO category (id, title, parentid) VALUES (5050, 'Other', 5000); +INSERT INTO category (id, title, parentid) VALUES (5060, 'Sport', 5000); +INSERT INTO category (id, title, parentid) VALUES (5070, 'Anime', 5000); +INSERT INTO category (id, title, parentid) VALUES (5080, 'Documentary', 5000); + +INSERT INTO category (id, title, parentid) VALUES (6010, 'DVD', 6000); +INSERT INTO category (id, title, parentid) VALUES (6020, 'WMV', 6000); +INSERT INTO category (id, title, parentid) VALUES (6030, 'XviD', 6000); +INSERT INTO category (id, title, parentid) VALUES (6040, 'x264', 6000); +INSERT INTO category (id, title, parentid) VALUES (6050, 'Pack', 6000); +INSERT INTO category (id, title, parentid) VALUES (6060, 'ImgSet', 6000); +INSERT INTO category (id, title, parentid) VALUES (6070, 'Other', 6000); + +INSERT INTO category (id, title, parentid) VALUES (7010, 'Mags', 7000); +INSERT INTO category (id, title, parentid) VALUES (7020, 'Ebook', 7000); +INSERT INTO category (id, title, parentid) VALUES (7030, 'Comics', 7000); +INSERT INTO category (id, title, parentid) VALUES (7040, 'Technical', 7000); +INSERT INTO category (id, title, parentid) VALUES (7050, 'Other', 7000); +INSERT INTO category (id, title, parentid) VALUES (7060, 'Foreign', 7000); + +INSERT INTO category (id, title, parentid) VALUES (8010, 'Misc', 8000); +INSERT INTO category (id, title, parentid) VALUES (8020, 'Hashed', 8000); + +UPDATE `tmux` SET `value` = '50' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0051_tmux.sql b/resources/db/patches/0051_tmux.sql new file mode 100644 index 000000000..286977e73 --- /dev/null +++ b/resources/db/patches/0051_tmux.sql @@ -0,0 +1,2 @@ +INSERT IGNORE INTO tmux (setting, value) VALUE ('minsizetopostprocess', '1'); +UPDATE `tmux` SET `value` = '51' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0052~gamesinfo.sql b/resources/db/patches/0052~gamesinfo.sql new file mode 100644 index 000000000..78da0f2df --- /dev/null +++ b/resources/db/patches/0052~gamesinfo.sql @@ -0,0 +1,24 @@ +DROP TABLE IF EXISTS gamesinfo; +CREATE TABLE gamesinfo ( + id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, + title VARCHAR(255) NOT NULL, + asin VARCHAR(128) DEFAULT NULL, + url VARCHAR(1000) DEFAULT NULL, + platform VARCHAR(255) DEFAULT NULL, + publisher VARCHAR(255) DEFAULT NULL, + genre_id INT(10) NULL DEFAULT NULL, + esrb VARCHAR(255) NULL DEFAULT NULL, + releasedate DATETIME DEFAULT NULL, + review VARCHAR(3000) DEFAULT NULL, + cover TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', + createddate DATETIME NOT NULL, + updateddate DATETIME NOT NULL, + PRIMARY KEY (id), + UNIQUE INDEX ix_gamesinfo_asin (asin) +) + ENGINE = InnoDB + DEFAULT CHARSET = utf8 + COLLATE = utf8_unicode_ci + AUTO_INCREMENT = 1; + + UPDATE `tmux` SET `value` = '52' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0053~site.sql b/resources/db/patches/0053~site.sql new file mode 100644 index 000000000..cbd08d8a3 --- /dev/null +++ b/resources/db/patches/0053~site.sql @@ -0,0 +1,2 @@ +INSERT INTO `site` (`setting`, `value`) VALUES ('giantbombkey', ''); +UPDATE `tmux` SET `value` = '53' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0054~releases.sql b/resources/db/patches/0054~releases.sql new file mode 100644 index 000000000..948ea1e66 --- /dev/null +++ b/resources/db/patches/0054~releases.sql @@ -0,0 +1,3 @@ +ALTER TABLE releases ADD COLUMN gamesinfo_id INT AFTER consoleinfoid; +CREATE INDEX ix_releases_gamesinfo_id ON releases (gamesinfo_id); +UPDATE `tmux` SET `value` = '54' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0055~users.sql b/resources/db/patches/0055~users.sql new file mode 100644 index 000000000..3856ff3b1 --- /dev/null +++ b/resources/db/patches/0055~users.sql @@ -0,0 +1,2 @@ +ALTER TABLE users ADD COLUMN gameview INT AFTER consoleview; +UPDATE `tmux` SET `value` = '55' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0056~menu.sql b/resources/db/patches/0056~menu.sql new file mode 100644 index 000000000..267d4f9ed --- /dev/null +++ b/resources/db/patches/0056~menu.sql @@ -0,0 +1,2 @@ +INSERT INTO menu (href, title, tooltip, role, ordinal ) VALUES ('newposterwall', 'New Releases', "Newest Releases Poster Wall", 1, 11); +UPDATE `tmux` SET `value` = '56' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0057~releases.sql b/resources/db/patches/0057~releases.sql new file mode 100644 index 000000000..32db0690f --- /dev/null +++ b/resources/db/patches/0057~releases.sql @@ -0,0 +1,2 @@ +ALTER TABLE releases ADD COLUMN proc_sorter TINYINT(1) NOT NULL DEFAULT '0'; +UPDATE `tmux` SET `value` = '57' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0058~tmux.sql b/resources/db/patches/0058~tmux.sql new file mode 100644 index 000000000..3643d61ea --- /dev/null +++ b/resources/db/patches/0058~tmux.sql @@ -0,0 +1,6 @@ +DELETE FROM `tmux` WHERE `setting` = 'dehash'; +DELETE FROM `tmux` WHERE `setting` = 'dehash_timer'; +DELETE FROM `tmux` WHERE `setting` = 'lookup_reqids'; +DELETE FROM `tmux` WHERE `setting` = 'lookup_reqids_timer'; +DELETE FROM `tmux` WHERE `setting` = 'request_url'; +UPDATE `tmux` set `value` = '58' where `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0059~users.sql b/resources/db/patches/0059~users.sql new file mode 100644 index 000000000..b305d7cec --- /dev/null +++ b/resources/db/patches/0059~users.sql @@ -0,0 +1,2 @@ +ALTER TABLE users ADD COLUMN xxxview INT AFTER gameview; +UPDATE `tmux` set `value` = '59' where `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0060~xxxinfo.sql b/resources/db/patches/0060~xxxinfo.sql new file mode 100644 index 000000000..d5e26e114 --- /dev/null +++ b/resources/db/patches/0060~xxxinfo.sql @@ -0,0 +1,27 @@ +DROP TABLE IF EXISTS xxxinfo; +CREATE TABLE xxxinfo ( + id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, + title VARCHAR(255) NOT NULL, + tagline VARCHAR(1024) NOT NULL, + plot BLOB NULL DEFAULT NULL, + genre VARCHAR(64) NOT NULL, + director VARCHAR(64) DEFAULT NULL, + actors VARCHAR(2000) NOT NULL, + extras TEXT DEFAULT NULL, + productinfo TEXT DEFAULT NULL, + trailers TEXT DEFAULT NULL, + directurl VARCHAR(2000) NOT NULL, + classused VARCHAR(3) NOT NULL, + cover TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', + backdrop TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', + createddate DATETIME NOT NULL, + updateddate DATETIME NOT NULL, + PRIMARY KEY (id), + INDEX ix_xxxinfo_title (title) +) + ENGINE = InnoDB + DEFAULT CHARSET = utf8 + COLLATE = utf8_unicode_ci + AUTO_INCREMENT = 1; + +UPDATE `tmux` SET `value` = '60' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0061~releases.sql b/resources/db/patches/0061~releases.sql new file mode 100644 index 000000000..264095ede --- /dev/null +++ b/resources/db/patches/0061~releases.sql @@ -0,0 +1,3 @@ +ALTER TABLE releases ADD COLUMN xxxinfo_id INT AFTER imdbid; +CREATE INDEX ix_releases_xxxinfo_id ON releases (xxxinfo_id); +UPDATE `tmux` SET `value` = '61' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0062~releases.sql b/resources/db/patches/0062~releases.sql new file mode 100644 index 000000000..e56e93e72 --- /dev/null +++ b/resources/db/patches/0062~releases.sql @@ -0,0 +1,5 @@ +UPDATE releases SET gamesinfo_id = 0 WHERE gamesinfo_id IS NULL; +ALTER TABLE releases MODIFY COLUMN gamesinfo_id INT(10) SIGNED NOT NULL DEFAULT '0'; +UPDATE releases SET xxxinfo_id = 0 WHERE xxxinfo_id IS NULL; +ALTER TABLE releases MODIFY COLUMN xxxinfo_id INT(10) SIGNED NOT NULL DEFAULT '0'; +UPDATE `tmux` SET `value` = '62' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0063~site.sql b/resources/db/patches/0063~site.sql new file mode 100644 index 000000000..af3fe2313 --- /dev/null +++ b/resources/db/patches/0063~site.sql @@ -0,0 +1,2 @@ +INSERT INTO `site` (`setting`, `value`) VALUES ('lookupxxx', 1); +UPDATE `tmux` SET `value` = '63' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0064~site.sql b/resources/db/patches/0064~site.sql new file mode 100644 index 000000000..abdc614f4 --- /dev/null +++ b/resources/db/patches/0064~site.sql @@ -0,0 +1,2 @@ +INSERT INTO `site` (`setting`, `value`) VALUES ('maxxxxprocessed', 100); +UPDATE `tmux` SET `value` = '64' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0065~users.sql b/resources/db/patches/0065~users.sql new file mode 100644 index 000000000..d7f9cb618 --- /dev/null +++ b/resources/db/patches/0065~users.sql @@ -0,0 +1,4 @@ + +ALTER TABLE users ADD COLUMN cp_api VARCHAR(255) NULL DEFAULT NULL; +ALTER TABLE users ADD COLUMN cp_url VARCHAR(255) NULL DEFAULT NULL; +UPDATE `tmux` SET `value` = '65' WHERE `setting` = 'sqlpatch'; diff --git a/resources/db/patches/0066~genres.sql b/resources/db/patches/0066~genres.sql new file mode 100644 index 000000000..ad313c0a4 --- /dev/null +++ b/resources/db/patches/0066~genres.sql @@ -0,0 +1,497 @@ +DROP TABLE IF EXISTS `genres`; +CREATE TABLE IF NOT EXISTS `genres` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `type` int(4) DEFAULT NULL, + `disabled` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC AUTO_INCREMENT=635; + +INSERT IGNORE INTO `genres` (`id`, `title`, `type`, `disabled`) VALUES +(150, 'Blues', 3000, 0), +(151, 'Classic Rock', 3000, 0), +(152, 'Country', 3000, 0), +(153, 'Dance', 3000, 0), +(154, 'Disco', 3000, 0), +(155, 'Funk', 3000, 0), +(156, 'Grunge', 3000, 0), +(157, 'Hip-Hop', 3000, 0), +(158, 'Jazz', 3000, 0), +(159, 'Metal', 3000, 0), +(160, 'New Age', 3000, 0), +(161, 'Oldies', 3000, 0), +(162, 'Other', 3000, 0), +(163, 'Pop', 3000, 0), +(164, 'R&B', 3000, 0), +(165, 'Rap', 3000, 0), +(166, 'Reggae', 3000, 0), +(167, 'Rock', 3000, 0), +(168, 'Techno', 3000, 0), +(169, 'Industrial', 3000, 0), +(170, 'Alternative', 3000, 0), +(171, 'Ska', 3000, 0), +(172, 'Death Metal', 3000, 0), +(173, 'Pranks', 3000, 0), +(174, 'Soundtrack', 3000, 0), +(175, 'Euro-Techno', 3000, 0), +(176, 'Ambient', 3000, 0), +(177, 'Trip-Hop', 3000, 0), +(178, 'Vocal', 3000, 0), +(179, 'Jazz+Funk', 3000, 0), +(180, 'Fusion', 3000, 0), +(181, 'Trance', 3000, 0), +(182, 'Classical', 3000, 0), +(183, 'Instrumental', 3000, 0), +(184, 'Acid', 3000, 0), +(185, 'House', 3000, 0), +(186, 'Game', 3000, 0), +(187, 'Sound Clip', 3000, 0), +(188, 'Gospel', 3000, 0), +(189, 'Noise', 3000, 0), +(190, 'Alternative Rock', 3000, 0), +(191, 'Bass', 3000, 0), +(192, 'Soul', 3000, 0), +(193, 'Punk', 3000, 0), +(194, 'Space', 3000, 0), +(195, 'Meditative', 3000, 0), +(196, 'Instrumental Pop', 3000, 0), +(197, 'Instrumental Rock', 3000, 0), +(198, 'Ethnic', 3000, 0), +(199, 'Gothic', 3000, 0), +(200, 'Darkwave', 3000, 0), +(201, 'Techno-Industrial', 3000, 0), +(202, 'Electronic', 3000, 0), +(203, 'Pop-Folk', 3000, 0), +(204, 'Eurodance', 3000, 0), +(205, 'Dream', 3000, 0), +(206, 'Southern Rock', 3000, 0), +(207, 'Comedy', 3000, 0), +(208, 'Cult', 3000, 0), +(209, 'Gangsta', 3000, 0), +(210, 'Top 40', 3000, 0), +(211, 'Christian Rap', 3000, 0), +(212, 'Pop/Funk', 3000, 0), +(213, 'Jungle', 3000, 0), +(214, 'Native US', 3000, 0), +(215, 'Cabaret', 3000, 0), +(216, 'New Wave', 3000, 0), +(217, 'Psychadelic', 3000, 0), +(218, 'Rave', 3000, 0), +(219, 'Showtunes', 3000, 0), +(220, 'Trailer', 3000, 0), +(221, 'Lo-Fi', 3000, 0), +(222, 'Tribal', 3000, 0), +(223, 'Acid Punk', 3000, 0), +(224, 'Acid Jazz', 3000, 0), +(225, 'Polka', 3000, 0), +(226, 'Retro', 3000, 0), +(227, 'Musical', 3000, 0), +(228, 'Rock & Roll', 3000, 0), +(229, 'Hard Rock', 3000, 0), +(230, 'Folk', 3000, 0), +(231, 'Folk-Rock', 3000, 0), +(232, 'National Folk', 3000, 0), +(233, 'Swing', 3000, 0), +(234, 'Fast Fusion', 3000, 0), +(235, 'Bebob', 3000, 0), +(236, 'Latin', 3000, 0), +(237, 'Revival', 3000, 0), +(238, 'Celtic', 3000, 0), +(239, 'Bluegrass', 3000, 0), +(240, 'Avantgarde', 3000, 0), +(241, 'Gothic Rock', 3000, 0), +(242, 'Progressive Rock', 3000, 0), +(243, 'Psychedelic Rock', 3000, 0), +(244, 'Symphonic Rock', 3000, 0), +(245, 'Slow Rock', 3000, 0), +(246, 'Big Band', 3000, 0), +(247, 'Chorus', 3000, 0), +(248, 'Easy Listening', 3000, 0), +(249, 'Acoustic', 3000, 0), +(250, 'Humour', 3000, 0), +(251, 'Speech', 3000, 0), +(252, 'Chanson', 3000, 0), +(253, 'Opera', 3000, 0), +(254, 'Chamber Music', 3000, 0), +(255, 'Sonata', 3000, 0), +(256, 'Symphony', 3000, 0), +(257, 'Booty Bass', 3000, 0), +(258, 'Primus', 3000, 0), +(259, 'Porn Groove', 3000, 0), +(260, 'Satire', 3000, 0), +(261, 'Slow Jam', 3000, 0), +(262, 'Club', 3000, 0), +(263, 'Tango', 3000, 0), +(264, 'Samba', 3000, 0), +(265, 'Folklore', 3000, 0), +(266, 'Ballad', 3000, 0), +(267, 'Power Ballad', 3000, 0), +(268, 'Rhytmic Soul', 3000, 0), +(269, 'Freestyle', 3000, 0), +(270, 'Duet', 3000, 0), +(271, 'Punk Rock', 3000, 0), +(272, 'Drum Solo', 3000, 0), +(273, 'Acapella', 3000, 0), +(274, 'Euro-House', 3000, 0), +(275, 'Dance Hall', 3000, 0), +(276, 'Goa', 3000, 0), +(277, 'Drum & Bass', 3000, 0), +(278, 'Club-House', 3000, 0), +(279, 'Hardcore', 3000, 0), +(280, 'Terror', 3000, 0), +(281, 'Indie', 3000, 0), +(282, 'BritPop', 3000, 0), +(283, 'Negerpunk', 3000, 0), +(284, 'Polsk Punk', 3000, 0), +(285, 'Beat', 3000, 0), +(286, 'Christian Gangsta', 3000, 0), +(287, 'Heavy Metal', 3000, 0), +(288, 'Black Metal', 3000, 0), +(289, 'Crossover', 3000, 0), +(290, 'Contemporary C', 3000, 0), +(291, 'Christian Rock', 3000, 0), +(292, 'Merengue', 3000, 0), +(293, 'Salsa', 3000, 0), +(294, 'Thrash Metal', 3000, 0), +(295, 'Anime', 3000, 0), +(296, 'JPop', 3000, 0), +(297, 'SynthPop', 3000, 0), +(298, 'Electronica', 3000, 0), +(299, 'World Music', 3000, 0), +(300, 'Miscellaneous', 3000, 0), +(301, 'Rap & Hip-Hop', 3000, 0), +(302, 'Dance & Electronic', 3000, 0), +(303, 'Adventure', 1000, 0), +(304, 'Hard Rock & Metal', 3000, 0), +(305, 'Broadway & Vocalists', 3000, 0), +(306, 'Unknown', 1000, 0), +(307, 'Christian & Gospel', 3000, 0), +(308, '', 3000, 0), +(309, 'Action', 1000, 0), +(310, 'Unknown', 4000, 0), +(311, 'Action', 4000, 0), +(312, 'Strategy', 4000, 0), +(313, 'Puzzle', 4000, 0), +(314, 'Adventure', 4000, 0), +(315, 'Sports', 4000, 0), +(316, 'Simulation', 4000, 0), +(317, 'Anal', 6000, 0), +(318, 'Big Butt', 6000, 0), +(319, 'Gonzo', 6000, 0), +(320, 'Oiled', 6000, 0), +(321, 'Widescreen', 6000, 0), +(322, '18+ Teens', 6000, 0), +(323, 'Big Cocks', 6000, 0), +(324, 'Blu-Ray', 6000, 0), +(325, 'Feature', 6000, 0), +(326, 'Prison', 6000, 0), +(327, 'All Sex', 6000, 0), +(328, 'Couples', 6000, 0), +(329, 'European', 6000, 0), +(330, 'Foreign', 6000, 0), +(331, 'Point Of View', 6000, 0), +(332, 'Threesomes', 6000, 0), +(333, 'College', 6000, 0), +(334, 'Teachers', 6000, 0), +(335, 'Older Men', 6000, 0), +(336, 'Rimming', 6000, 0), +(337, 'Glory Hole', 6000, 0), +(338, 'Blowjobs', 6000, 0), +(339, 'Big Budget', 6000, 0), +(340, 'Gaping', 6000, 0), +(341, 'Sex Toy Play', 6000, 0), +(342, 'Cumshots', 6000, 0), +(343, 'Gangbang', 6000, 0), +(344, 'Fetish', 6000, 0), +(345, 'Transsexual', 6000, 0), +(346, 'Big Boobs', 6000, 0), +(347, 'Mature', 6000, 0), +(348, 'MILF', 6000, 0), +(349, 'All Girl / Lesbian', 6000, 0), +(350, 'Interracial', 6000, 0), +(351, 'Orgy', 6000, 0), +(352, '18+ Teen Transsexuals', 6000, 0), +(353, 'Babysitter', 6000, 0), +(354, 'Amateur', 6000, 0), +(355, 'Public Sex', 6000, 0), +(356, 'Web-To-DVD', 6000, 0), +(357, 'Compilation', 6000, 0), +(358, 'Porn For Couples', 6000, 0), +(359, 'Romance', 6000, 0), +(360, 'Young (18+) Ladies', 6000, 0), +(361, 'Redheads', 6000, 0), +(362, 'Affairs/Love Triangles', 6000, 0), +(363, 'Women Directors', 6000, 0), +(364, 'Made For Women', 6000, 0), +(365, 'Pantyhose/Stocking', 6000, 0), +(366, 'Black', 6000, 0), +(367, 'Domination', 6000, 0), +(368, 'Face Sitting', 6000, 0), +(369, 'Female Domination', 6000, 0), +(370, 'Interactive', 6000, 0), +(371, 'Bi-Sexual', 6000, 0), +(372, 'Tit Fucking', 6000, 0), +(373, 'Anal Sex', 6000, 0), +(374, 'Big Pussies', 6000, 0), +(375, 'Cock & Ball Play', 6000, 0), +(376, 'Facials', 6000, 0), +(377, 'Finger Fucking', 6000, 0), +(378, 'Girl-Girl/Lesbian', 6000, 0), +(379, 'Nipple Play', 6000, 0), +(380, 'xtreme', 6000, 0), +(381, 'Canadian', 6000, 0), +(382, 'Black Hair', 6000, 0), +(383, 'Blondes', 6000, 0), +(384, 'Brunettes', 6000, 0), +(385, 'Cream Pie', 6000, 0), +(386, 'Latex/Rubber', 6000, 0), +(387, 'S&M', 6000, 0), +(388, 'Watersports', 6000, 0), +(389, 'BBW', 6000, 0), +(390, 'Prebooks', 6000, 0), +(391, 'Asian', 6000, 0), +(392, 'Massage', 6000, 0), +(393, 'Swallowing', 6000, 0), +(394, 'Small Tits', 6000, 0), +(395, 'Naturally Busty', 6000, 0), +(396, 'Affairs & Love Triangles', 6000, 0), +(397, 'Wives', 6000, 0), +(398, 'Swingers', 6000, 0), +(399, 'Old & Young Females (18+)', 6000, 0), +(400, 'Maid', 6000, 0), +(401, 'Pantyhose & Stocking', 6000, 0), +(402, 'Masturbation', 6000, 0), +(403, 'Alt Girls', 6000, 0), +(404, 'Tattoo', 6000, 0), +(405, 'Exotic Workouts', 6000, 0), +(406, 'Athletes', 6000, 0), +(407, 'Deep Throat', 6000, 0), +(408, 'Wrestling & Fighting', 6000, 0), +(409, 'Cheerleaders', 6000, 0), +(410, 'Home Made Movies', 6000, 0), +(411, 'Squirting', 6000, 0), +(412, 'Cuckolds', 6000, 0), +(413, 'Cougars', 6000, 0), +(414, 'Cosplay', 6000, 0), +(415, 'Bikini Babes', 6000, 0), +(416, 'Brazilian', 6000, 0), +(417, 'Grannies', 6000, 0), +(418, 'Erotic Vignette', 6000, 0), +(419, 'Water Play', 6000, 0), +(420, 'Hairy', 6000, 0), +(421, 'CFNM', 6000, 0), +(422, 'Stripping', 6000, 0), +(423, 'Double Penetration', 6000, 0), +(424, 'Lingerie', 6000, 0), +(425, 'Nurses & Doctors', 6000, 0), +(426, 'British', 6000, 0), +(427, 'Fetish Wear', 6000, 0), +(428, 'Strap-Ons', 6000, 0), +(429, 'Indian', 6000, 0), +(430, 'Spoofs & Parodies', 6000, 0), +(431, 'Pregnant', 6000, 0), +(432, 'Classic', 6000, 0), +(433, 'Jeans & Denim', 6000, 0), +(434, 'Boxed Sets', 6000, 0), +(435, 'Mystery', 6000, 0), +(436, 'Girl on Guy Strap-Ons', 6000, 0), +(437, 'Celebrity', 6000, 0), +(438, 'Handjobs', 6000, 0), +(439, 'Shaved', 6000, 0), +(440, 'Vampires', 6000, 0), +(441, 'Panties & Thongs', 6000, 0), +(442, 'Instructional (X-Rated)', 6000, 0), +(443, 'Fantasy', 6000, 0), +(444, 'Historical / Period Piece', 6000, 0), +(445, 'Western', 6000, 0), +(446, 'Midgets', 6000, 0), +(447, 'Oddities', 6000, 0), +(448, 'Foot Fetish', 6000, 0), +(449, 'Virgin', 6000, 0), +(450, 'Horror', 6000, 0), +(451, 'Streaming Video', 6000, 0), +(452, 'Solo Girls', 6000, 0), +(453, 'Solo Female', 6000, 0), +(454, 'Kinky', 6000, 0), +(455, 'By Women', 6000, 0), +(456, 'All Girl', 6000, 0), +(457, 'Exhibitionism', 6000, 0), +(458, 'College Co-Eds', 6000, 0), +(459, 'Pro-Am', 6000, 0), +(460, 'Parties / Clubs', 6000, 0), +(461, 'Sex', 6000, 0), +(462, 'Europe', 6000, 0), +(463, 'Germany', 6000, 0), +(464, 'Tantra / Spirituality', 6000, 0), +(465, 'Big Tits', 6000, 0), +(466, 'United Kingdom', 6000, 0), +(467, 'Female on Female', 6000, 0), +(468, 'Strapons', 6000, 0), +(469, 'Lesbian', 6000, 0), +(470, 'Potpourri', 6000, 0), +(471, 'Humor', 6000, 0), +(472, 'Spoofs / Parodies', 6000, 0), +(473, 'Gagging', 6000, 0), +(474, 'Family', 6000, 0), +(475, 'Vignettes', 6000, 0), +(476, 'Body', 6000, 0), +(477, 'Home Made', 6000, 0), +(478, 'POV', 6000, 0), +(479, 'M on F', 6000, 0), +(480, 'Gaper', 6000, 0), +(481, 'Latex & Rubber', 6000, 0), +(482, 'Foreign Kink', 6000, 0), +(483, 'Masks', 6000, 0), +(484, 'Group Sex', 6000, 0), +(485, 'Older Women', 6000, 0), +(486, 'Young Women / Teens', 6000, 0), +(487, 'Contemporary', 6000, 0), +(488, 'Features', 6000, 0), +(489, 'Biker Chicks', 6000, 0), +(490, 'Hetero Couples', 6000, 0), +(491, 'Caucasian Girls', 6000, 0), +(492, 'Modern', 6000, 0), +(493, '2011 AVN Award Nominees', 6000, 0), +(494, 'All Black', 6000, 0), +(495, 'Cumshots & Facials', 6000, 0), +(496, 'Outdoors', 6000, 0), +(497, 'Classics', 6000, 0), +(498, 'BDSM', 6000, 0), +(499, '90''s', 6000, 0), +(500, 'Oral', 6000, 0), +(501, 'Mixed Races', 6000, 0), +(502, 'Ebony Girls', 6000, 0), +(503, 'Black Women', 6000, 0), +(504, 'Striptease', 6000, 0), +(505, 'Dancers / Strippers', 6000, 0), +(506, '2013 AVN Award Nominees', 6000, 0), +(507, '2013 Sex Awards Nominees', 6000, 0), +(508, 'Cunnilingus', 6000, 0), +(509, 'Asian Girls', 6000, 0), +(510, 'Erotica', 6000, 0), +(511, 'Fantasies', 6000, 0), +(512, 'Black Men', 6000, 0), +(513, 'Latina', 6000, 0), +(514, 'Latina Girls', 6000, 0), +(515, 'Cuckold', 6000, 0), +(516, 'Natural Look', 6000, 0), +(517, 'Footjobs', 6000, 0), +(518, 'Feet', 6000, 0), +(519, 'Feet & Shoes', 6000, 0), +(520, 'Legs & Nylons', 6000, 0), +(521, 'Teen', 6000, 0), +(522, 'Russia', 6000, 0), +(523, 'Russian', 6000, 0), +(524, 'Schoolgirls', 6000, 0), +(525, 'Massage Parlor', 6000, 0), +(526, 'Virgins', 6000, 0), +(527, 'Beach', 6000, 0), +(528, '2008 AVN Award Nominees', 6000, 0), +(529, 'Czech', 6000, 0), +(530, 'Orgies', 6000, 0), +(531, 'Babysitters', 6000, 0), +(532, '2009 AVN Award Nominees', 6000, 0), +(533, 'Big Butts', 6000, 0), +(534, 'Handjob Female on Male', 6000, 0), +(535, 'Hidden Cam', 6000, 0), +(536, '2014 AVN Award Nominees', 6000, 0), +(537, 'XBIZ Awards', 6000, 0), +(538, 'Spain', 6000, 0), +(539, 'Spanish', 6000, 0), +(540, 'Feminist Porn Awards', 6000, 0), +(541, 'Sybian', 6000, 0), +(542, 'Instructional', 6000, 0), +(543, 'Female Ejaculation', 6000, 0), +(544, 'Dutch', 6000, 0), +(545, 'Maids', 6000, 0), +(546, 'Tattooed / Pierced', 6000, 0), +(547, 'Shower / Bathroom', 6000, 0), +(548, 'Cum-Swapping', 6000, 0), +(549, 'Girls Next Door', 6000, 0), +(550, 'Petite', 6000, 0), +(551, 'Gangbang - M on F', 6000, 0), +(552, 'Office', 6000, 0), +(553, 'Toys', 6000, 0), +(554, '2010 AVN Award Nominees', 6000, 0), +(555, 'International', 6000, 0), +(556, 'Student', 6000, 0), +(557, 'Deep Throating', 6000, 0), +(558, 'Boat', 6000, 0), +(559, 'Secretaries', 6000, 0), +(560, 'Reality', 6000, 0), +(561, 'Brazil', 6000, 0), +(562, 'Male on Female', 6000, 0), +(563, 'Nurses', 6000, 0), +(564, 'Interactive Sex', 6000, 0), +(565, 'Up & Coming', 6000, 0), +(566, 'Cum Swapping', 6000, 0), +(567, 'Multi-Angles', 6000, 0), +(568, 'Leather', 6000, 0), +(569, 'Pot Luck', 6000, 0), +(570, 'Cream Pies', 6000, 0), +(571, 'Behind The Scenes', 6000, 0), +(572, 'Auditions', 6000, 0), +(573, 'Pickup', 6000, 0), +(574, 'Sex Machines', 6000, 0), +(575, '2012 AVN Award Nominees', 6000, 0), +(576, 'Voyeurism', 6000, 0), +(577, 'Voyeur', 6000, 0), +(578, 'Bukkake', 6000, 0), +(579, 'Smoking', 6000, 0), +(580, 'Gangbang - F on F', 6000, 0), +(581, 'Italy', 6000, 0), +(582, 'Italian', 6000, 0), +(583, 'Portuguese', 6000, 0), +(584, 'Locale', 6000, 0), +(585, 'Secretaries/Office', 6000, 0), +(586, 'Sex at Work', 6000, 0), +(587, 'School Girls', 6000, 0), +(588, 'Felching', 6000, 0), +(589, 'Glasses', 6000, 0), +(590, 'Euro', 6000, 0), +(591, 'Pissing', 6000, 0), +(592, 'Shocking Penetration', 6000, 0), +(593, 'German Speaking', 6000, 0), +(594, 'Anilingus', 6000, 0), +(595, 'High Definition', 6000, 0), +(596, 'M.I.L.F.', 6000, 0), +(597, 'Cougar', 6000, 0), +(598, 'Big Dick', 6000, 0), +(599, 'Cumshot', 6000, 0), +(600, 'Pantyhose/Stockings', 6000, 0), +(601, 'Dancers/Models', 6000, 0), +(602, 'Submales', 6000, 0), +(603, 'Threeway', 6000, 0), +(604, 'Fresh Faces', 6000, 0), +(605, 'Natural Breasts', 6000, 0), +(606, 'German', 6000, 0), +(607, 'Blowjob', 6000, 0), +(608, 'Gloryhole', 6000, 0), +(609, 'Black Dicks/White Chicks', 6000, 0), +(610, 'P.O.V.', 6000, 0), +(611, 'Glamour', 6000, 0), +(612, 'Brides & Weddings', 6000, 0), +(613, 'Exhibitionist', 6000, 0), +(614, 'Party Girls', 6000, 0), +(615, 'Reality Based', 6000, 0), +(616, 'Shemale', 6000, 0), +(617, 'Cheerleader', 6000, 0), +(618, 'Award Winning Movies', 6000, 0), +(619, 'New Release', 6000, 0), +(620, 'Foot', 6000, 0), +(621, 'Older / Younger', 6000, 0), +(622, 'Vintage', 6000, 0), +(623, 'Incest', 6000, 0), +(624, 'Femdom', 6000, 0), +(625, 'Strap-On', 6000, 0), +(626, 'Double Anal', 6000, 0), +(627, 'Costumes', 6000, 0), +(628, 'For Ladies', 6000, 0), +(629, 'Family Roleplay', 6000, 0), +(630, 'Girls With Toys', 6000, 0), +(631, 'Ass-to-mouth', 6000, 0), +(632, 'Parody', 6000, 0), +(633, 'Racing', 4000, 0), +(634, 'Double Penetration (Dp)', 6000, 0); + +UPDATE `tmux` SET `value` = '66' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0067~gamesinfo.sql b/resources/db/patches/0067~gamesinfo.sql new file mode 100644 index 000000000..b92ea7bfd --- /dev/null +++ b/resources/db/patches/0067~gamesinfo.sql @@ -0,0 +1,5 @@ +ALTER TABLE gamesinfo ADD COLUMN backdrop TINYINT(1) DEFAULT 0 AFTER cover; +ALTER TABLE gamesinfo ADD COLUMN trailer VARCHAR(1000) DEFAULT '' AFTER backdrop; +ALTER TABLE gamesinfo ADD COLUMN classused VARCHAR(10) DEFAULT 'steam' AFTER trailer; +UPDATE gamesinfo SET classused = 'gb'; +UPDATE `tmux` SET `value` = '67' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0068~xxxinfo.sql b/resources/db/patches/0068~xxxinfo.sql new file mode 100644 index 000000000..129bdf346 --- /dev/null +++ b/resources/db/patches/0068~xxxinfo.sql @@ -0,0 +1,3 @@ +ALTER TABLE xxxinfo MODIFY COLUMN classused varchar(4) DEFAULT 'ade'; +UPDATE xxxinfo SET classused = 'aebn' WHERE classused = 'aeb'; +UPDATE `tmux` SET `value` = '68' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0069~site.sql b/resources/db/patches/0069~site.sql new file mode 100644 index 000000000..7535bb2be --- /dev/null +++ b/resources/db/patches/0069~site.sql @@ -0,0 +1,2 @@ +INSERT INTO `site` (`setting`, `value`) VALUES ('anidbkey', ''); +UPDATE `tmux` SET `value` = '69' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0070~animetitles.sql b/resources/db/patches/0070~animetitles.sql new file mode 100644 index 000000000..f33f54c93 --- /dev/null +++ b/resources/db/patches/0070~animetitles.sql @@ -0,0 +1,2 @@ +ALTER TABLE animetitles CHANGE createddate unixtime INT(12) UNSIGNED NOT NULL; +UPDATE `tmux` SET `value` = '70' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0071~site.sql b/resources/db/patches/0071~site.sql new file mode 100644 index 000000000..f73998a23 --- /dev/null +++ b/resources/db/patches/0071~site.sql @@ -0,0 +1,2 @@ +INSERT INTO site (setting, value) VALUES ('rottentomatoquality', 'profile'); +UPDATE `tmux` SET `value` = '71' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0072~site.sql b/resources/db/patches/0072~site.sql new file mode 100644 index 000000000..9044d821a --- /dev/null +++ b/resources/db/patches/0072~site.sql @@ -0,0 +1,24 @@ +DROP TRIGGER IF EXISTS insert_hashes; +DROP TRIGGER IF EXISTS update_hashes; +DROP TRIGGER IF EXISTS delete_hashes; +DROP TRIGGER IF EXISTS check_rfinsert; +DROP TRIGGER IF EXISTS check_rfupdate; +DROP TRIGGER IF EXISTS check_insert; +DROP TRIGGER IF EXISTS check_update; +DROP TRIGGER IF EXISTS insert_MD5; + + +CREATE TRIGGER insert_hashes AFTER INSERT ON prehash FOR EACH ROW BEGIN INSERT INTO predbhash (pre_id, hashes) VALUES (NEW.id, CONCAT_WS(',', MD5(NEW.title), MD5(MD5(NEW.title)), SHA1(NEW.title)));END; +CREATE TRIGGER update_hashes AFTER UPDATE ON prehash FOR EACH ROW BEGIN IF NEW.title != OLD.title THEN UPDATE predbhash SET hashes = CONCAT_WS(',', MD5(NEW.title), MD5(MD5(NEW.title)), SHA1(NEW.title)) WHERE pre_id = OLD.id; END IF;END; +CREATE TRIGGER delete_hashes AFTER DELETE ON prehash FOR EACH ROW BEGIN DELETE FROM predbhash WHERE pre_id = OLD.id; END; +CREATE TRIGGER check_rfinsert BEFORE INSERT ON releasefiles FOR EACH ROW BEGIN IF NEW.name REGEXP '[a-fA-F0-9]{32}'THEN SET NEW.ishashed = 1; END IF;END; +CREATE TRIGGER check_rfupdate BEFORE UPDATE ON releasefiles FOR EACH ROW BEGIN IF NEW.name REGEXP '[a-fA-F0-9]{32}' THEN SET NEW.ishashed = 1; END IF; END; +CREATE TRIGGER check_insert BEFORE INSERT ON releases FOR EACH ROW BEGIN IF NEW.searchname REGEXP '[a-fA-F0-9]{32}' OR NEW.name REGEXP '[a-fA-F0-9]{32}' THEN SET NEW.ishashed = 1;ELSEIF NEW.name REGEXP '^\\[ ?([[:digit:]]{4,6}) ?\\]|^REQ\s*([[:digit:]]{4,6})|^([[:digit:]]{4,6})-[[:digit:]]{1}\\[' THEN SET NEW.isrequestid = 1; END IF; END; +CREATE TRIGGER check_update BEFORE UPDATE ON releases FOR EACH ROW BEGIN IF NEW.searchname REGEXP '[a-fA-F0-9]{32}' OR NEW.name REGEXP '[a-fA-F0-9]{32}' THEN SET NEW.ishashed = 1;ELSEIF NEW.name REGEXP '^\\[ ?([[:digit:]]{4,6}) ?\\]|^REQ\s*([[:digit:]]{4,6})|^([[:digit:]]{4,6})-[[:digit:]]{1}\\[' THEN SET NEW.isrequestid = 1;END IF;END; +CREATE TRIGGER insert_search AFTER INSERT ON releases FOR EACH ROW BEGIN INSERT INTO releasesearch (releaseid, guid, name, searchname) VALUES (NEW.id, NEW.guid, NEW.name, NEW.searchname);END; +CREATE TRIGGER update_search AFTER UPDATE ON releases FOR EACH ROW BEGIN IF NEW.guid != OLD.guid THEN UPDATE releasesearch SET guid = NEW.guid WHERE releaseid = OLD.id; END IF;IF NEW.name != OLD.name THEN UPDATE releasesearch SET name = NEW.name WHERE releaseid = OLD.id; END IF; IF NEW.searchname != OLD.searchname THEN UPDATE releasesearch SET searchname = NEW.searchname WHERE releaseid = OLD.id; END IF;END; +CREATE TRIGGER delete_search AFTER DELETE ON releases FOR EACH ROW BEGIN DELETE FROM releasesearch WHERE releaseid = OLD.id; END; +CREATE TRIGGER insert_MD5 BEFORE INSERT ON releasecomment FOR EACH ROW SET NEW.text_hash = MD5(NEW.text); + + +UPDATE `tmux` SET `value` = '72' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0073~releases.sql b/resources/db/patches/0073~releases.sql new file mode 100644 index 000000000..b9ede6073 --- /dev/null +++ b/resources/db/patches/0073~releases.sql @@ -0,0 +1,2 @@ +CREATE INDEX `ix_releases_xxxinfo_id` ON `releases` (`xxxinfo_id`); +UPDATE `tmux` SET `value` = '73' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0074~releases.sql b/resources/db/patches/0074~releases.sql new file mode 100644 index 000000000..9133e61d6 --- /dev/null +++ b/resources/db/patches/0074~releases.sql @@ -0,0 +1,2 @@ +ALTER TABLE `releases` CHANGE `nzbstatus` `nzbstatus` TINYINT( 1 ) NOT NULL DEFAULT '0'; +UPDATE `tmux` SET `value` = '74' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0075~site.sql b/resources/db/patches/0075~site.sql new file mode 100644 index 000000000..739c7dd73 --- /dev/null +++ b/resources/db/patches/0075~site.sql @@ -0,0 +1,2 @@ +INSERT IGNORE INTO `site` (`setting`, `value`) VALUE ('alternate_nntp', '0'); +UPDATE `tmux` SET `value` = '75' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0078~site.sql b/resources/db/patches/0078~site.sql new file mode 100644 index 000000000..2399a7c47 --- /dev/null +++ b/resources/db/patches/0078~site.sql @@ -0,0 +1,51 @@ +INSERT INTO `site` (`setting`, `value`) VALUES +('amazonsleep', '1000'), +('maxaddprocessed', '25'), +('maxnfoprocessed', '100'), +('maxrageprocessed', '75'), +('maximdbprocessed', '100'), +('maxanidbprocessed', '100'), +('maxmusicprocessed', '150'), +('maxgamesprocessed', '150'), +('maxbooksprocessed', '300'), +('maxnzbsprocessed', '1000'), +('maxpartrepair', '15000'), +('partrepair', '1'), +('binarythreads', '1'), + ('backfillthreads', '1'), + ('safebackfilldate', '2012-06-24'), +('postthreads', '1'), +('releasethreads', '1'), +('nzbthreads', '1'), +('maxsizetopostprocess', '100'), +('minsizetopostprocess', '1'), +('postthreadsamazon', '1'), +('postthreadsnon', '1'), +('segmentstodownload', '2'), +('passchkattempts', '1'), +('maxpartsprocessed', '3'), +('trakttvkey', ''), +('fanarttvkey', ''), +('lookuppar2', '1'), +('addpar2', '1'), +('fixnamethreads', '1'), +('fixnamesperrun', '1'), +('zippath', ''), +('processjpg', '1'), +('scrape', '1'), +('nntpretries', '10'), +('imdburl', '0'), +('yydecoderpath', ''), +('ffmpeg_duration', '5'), +('ffmpeg_image_time', '5'), +('processvideos', '0'), +('maxsizetoprocessnfo', '100'), +('minsizetoprocessnfo', '1'), +('nfothreads', '1'), +('extractusingrarinfo', '0'), +('maxnestedlevels', '3'), +('innerfileblacklist', ''), + ('miscotherretentionhours', '0'), + ('mischashedretentionhours', '0'); + +UPDATE `tmux` SET `value` = '78' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0079~site.sql b/resources/db/patches/0079~site.sql new file mode 100644 index 000000000..83ae30623 --- /dev/null +++ b/resources/db/patches/0079~site.sql @@ -0,0 +1,2 @@ +INSERT IGNORE INTO `site` (`setting`, `value`) VALUE ('maxnforetries', '5'); +UPDATE `tmux` SET `value` = '79' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0080~site.sql b/resources/db/patches/0080~site.sql new file mode 100644 index 000000000..2cf8072ce --- /dev/null +++ b/resources/db/patches/0080~site.sql @@ -0,0 +1,4 @@ +INSERT IGNORE INTO `site` (`setting`, `value`) VALUES + ('timeoutpath', ''), + ('timeoutseconds', '0'); +UPDATE `tmux` SET `value` = '80' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0081~movieinfo.sql b/resources/db/patches/0081~movieinfo.sql new file mode 100644 index 000000000..f7d68a24d --- /dev/null +++ b/resources/db/patches/0081~movieinfo.sql @@ -0,0 +1,2 @@ +ALTER TABLE `movieinfo` ADD `type` VARCHAR( 32 ) NOT NULL AFTER `genre` ; +UPDATE `tmux` SET `value` = '81' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0082~tvrageepisodes.sql b/resources/db/patches/0082~tvrageepisodes.sql new file mode 100644 index 000000000..105bac6bd --- /dev/null +++ b/resources/db/patches/0082~tvrageepisodes.sql @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS tvrageepisodes; +CREATE TABLE tvrageepisodes ( + id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, + rageid INT(11) UNSIGNED NOT NULL, + showtitle VARCHAR(255) DEFAULT NULL, + airdate DATETIME NOT NULL, + link VARCHAR(255) DEFAULT NULL, + fullep VARCHAR(20) NOT NULL, + eptitle VARCHAR(255) DEFAULT NULL, + PRIMARY KEY (id), + UNIQUE INDEX ix_tvrageepisodes_rageid (rageid, fullep) +) + ENGINE = INNODB + DEFAULT CHARSET = utf8 + COLLATE = utf8_unicode_ci + AUTO_INCREMENT = 1; +UPDATE `tmux` SET `value` = '82' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0083~site.sql b/resources/db/patches/0083~site.sql new file mode 100644 index 000000000..c93de7984 --- /dev/null +++ b/resources/db/patches/0083~site.sql @@ -0,0 +1,6 @@ +INSERT IGNORE INTO `site` (`setting`, `value`) VALUES + ('lookup_reqids', '1'), + ('reqidthreads', '1'), +('request_hours', '1'), +('request_url', 'http://reqid.nzedb.com/index.php'); +UPDATE `tmux` SET `value` = '83' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0084~groups.sql b/resources/db/patches/0084~groups.sql new file mode 100644 index 000000000..2d14de519 --- /dev/null +++ b/resources/db/patches/0084~groups.sql @@ -0,0 +1,3 @@ +ALTER TABLE `groups` ADD `backfill` TINYINT(1) NOT NULL DEFAULT '0' AFTER `active` ; + +UPDATE `tmux` set `value` = '84' where `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0085~site.sql b/resources/db/patches/0085~site.sql new file mode 100644 index 000000000..72968c22c --- /dev/null +++ b/resources/db/patches/0085~site.sql @@ -0,0 +1,2 @@ +INSERT IGNORE INTO `site` (`setting`, `value`) VALUE ('safebackfilldate', '2012-06-24'); +UPDATE `tmux` SET `value` = '85' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0086~category.sql b/resources/db/patches/0086~category.sql new file mode 100644 index 000000000..cf4b5f42b --- /dev/null +++ b/resources/db/patches/0086~category.sql @@ -0,0 +1,2 @@ +INSERT INTO category (id, title, parentid) VALUES (2080, 'WEB-DL', 2000); +UPDATE `tmux` SET `value` = '86' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0087~site.sql b/resources/db/patches/0087~site.sql new file mode 100644 index 000000000..a146c1938 --- /dev/null +++ b/resources/db/patches/0087~site.sql @@ -0,0 +1,6 @@ +INSERT IGNORE INTO `site` (`setting`, `value`) VALUES + ('safepartrepair','0'), + ('maxpartrepair', '15000'), + ('partrepairmaxtries', '3'), + ('tablepergroup', '0'); +UPDATE `tmux` SET `value` = '87' WHERE `setting` = 'sqlpatch'; diff --git a/resources/db/patches/0088~site.sql b/resources/db/patches/0088~site.sql new file mode 100644 index 000000000..1374b6131 --- /dev/null +++ b/resources/db/patches/0088~site.sql @@ -0,0 +1,3 @@ +INSERT IGNORE INTO `site` (`setting`, `value`) VALUE + ('nntpproxy','0'); +UPDATE `tmux` SET `value` = '88' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0089~site.sql b/resources/db/patches/0089~site.sql new file mode 100644 index 000000000..d86ca3404 --- /dev/null +++ b/resources/db/patches/0089~site.sql @@ -0,0 +1,2 @@ +INSERT IGNORE INTO `site` (`setting`, `value`) VALUE ('book_reqids','7010'); +UPDATE `tmux` SET `value` = '89' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0090~bookinfo.sql b/resources/db/patches/0090~bookinfo.sql new file mode 100644 index 000000000..eefd31066 --- /dev/null +++ b/resources/db/patches/0090~bookinfo.sql @@ -0,0 +1,2 @@ +ALTER TABLE `bookinfo` ADD `salesrank` INT(10) UNSIGNED DEFAULT NULL; +UPDATE `tmux` SET `value` = '90' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0091~releasesearch.sql b/resources/db/patches/0091~releasesearch.sql new file mode 100644 index 000000000..cd4b0ac74 --- /dev/null +++ b/resources/db/patches/0091~releasesearch.sql @@ -0,0 +1,15 @@ +ALTER TABLE releasesearch ADD COLUMN fromname VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL; +UPDATE releasesearch rs INNER JOIN releases r ON rs.releaseid = r.id SET rs.fromname = r.fromname; + +ALTER TABLE releasesearch DROP INDEX ix_releasesearch_name_searchname_ft; +ALTER TABLE releasesearch ADD FULLTEXT INDEX ix_releasesearch_name_ft (name); +ALTER TABLE releasesearch ADD FULLTEXT INDEX ix_releasesearch_searchname_ft (searchname); +ALTER TABLE releasesearch ADD FULLTEXT INDEX ix_releasesearch_fromname_ft (fromname); + +DROP TRIGGER IF EXISTS insert_search; +DROP TRIGGER IF EXISTS update_search; + +CREATE TRIGGER insert_search AFTER INSERT ON releases FOR EACH ROW BEGIN INSERT INTO releasesearch (releaseid, guid, name, searchname, fromname) VALUES (NEW.id, NEW.guid, NEW.name, NEW.searchname, NEW.fromname); END; +CREATE TRIGGER update_search AFTER UPDATE ON releases FOR EACH ROW BEGIN IF NEW.guid != OLD.guid THEN UPDATE releasesearch SET guid = NEW.guid WHERE releaseid = OLD.id; END IF; IF NEW.name != OLD.name THEN UPDATE releasesearch SET name = NEW.name WHERE releaseid = OLD.id; END IF; IF NEW.searchname != OLD.searchname THEN UPDATE releasesearch SET searchname = NEW.searchname WHERE releaseid = OLD.id; END IF; IF NEW.fromname != OLD.fromname THEN UPDATE releasesearch SET fromname = NEW.fromname WHERE releaseid = OLD.id; END IF; END; + +UPDATE `tmux` SET `value` = '91' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0092~bookinfo.sql b/resources/db/patches/0092~bookinfo.sql new file mode 100644 index 000000000..754386b96 --- /dev/null +++ b/resources/db/patches/0092~bookinfo.sql @@ -0,0 +1,3 @@ +ALTER TABLE `bookinfo` ADD `overview` VARCHAR(3000) DEFAULT NULL; +ALTER TABLE `bookinfo` ADD `genre` VARCHAR(255) NOT NULL; +UPDATE `tmux` SET `value` = '92' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0093~anidb.sql b/resources/db/patches/0093~anidb.sql new file mode 100644 index 000000000..1b69be901 --- /dev/null +++ b/resources/db/patches/0093~anidb.sql @@ -0,0 +1,70 @@ +DROP TABLE IF EXISTS anidb_episodes; +CREATE TABLE anidb_episodes ( + anidbid INT(10) UNSIGNED NOT NULL + COMMENT 'id of title from AniDB', + episodeid INT(10) UNSIGNED NOT NULL DEFAULT '0' + COMMENT 'anidb id for this episode', + episode_no SMALLINT(5) UNSIGNED NOT NULL + COMMENT 'Numeric version of episode (leave 0 for combined episodes).', + episode_title VARCHAR(255) + COLLATE utf8_unicode_ci NOT NULL + COMMENT 'Title of the episode (en, x-jat)', + airdate DATE NOT NULL, + PRIMARY KEY (anidbid, episodeid) +) + ENGINE = InnoDB + DEFAULT CHARSET =utf8 + COLLATE =utf8_unicode_ci; + + +DROP TABLE IF EXISTS anidb_info; +CREATE TABLE anidb_info ( + anidbid INT(10) UNSIGNED NOT NULL + COMMENT 'id of title from AniDB', + type VARCHAR(32) + COLLATE utf8_unicode_ci DEFAULT NULL, + startdate DATE DEFAULT NULL, + enddate DATE DEFAULT NULL, + updated TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + related VARCHAR(1024) + COLLATE utf8_unicode_ci DEFAULT NULL, + similar VARCHAR(1024) + COLLATE utf8_unicode_ci DEFAULT NULL, + creators VARCHAR(1024) + COLLATE utf8_unicode_ci DEFAULT NULL, + description TEXT + COLLATE utf8_unicode_ci DEFAULT NULL, + rating VARCHAR(5) + COLLATE utf8_unicode_ci DEFAULT NULL, + picture VARCHAR(255) + COLLATE utf8_unicode_ci DEFAULT NULL, + categories VARCHAR(1024) + COLLATE utf8_unicode_ci DEFAULT NULL, + characters VARCHAR(1024) + COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (anidbid), + KEY ix_anidb_info_datetime (startdate, enddate, updated) +) + ENGINE = InnoDB + DEFAULT CHARSET =utf8 + COLLATE =utf8_unicode_ci; + + +DROP TABLE IF EXISTS anidb_titles; +CREATE TABLE anidb_titles ( + anidbid INT(10) UNSIGNED NOT NULL + COMMENT 'id of title from AniDB', + type VARCHAR(25) + COLLATE utf8_unicode_ci NOT NULL + COMMENT 'type of title.', + lang VARCHAR(25) + COLLATE utf8_unicode_ci NOT NULL, + title VARCHAR(255) + COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (anidbid, type, lang, title) +) + ENGINE = InnoDB + DEFAULT CHARSET = utf8 + COLLATE = utf8_unicode_ci; + +UPDATE `tmux` SET `value` = '93' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0094~site.sql b/resources/db/patches/0094~site.sql new file mode 100644 index 000000000..89e215cf8 --- /dev/null +++ b/resources/db/patches/0094~site.sql @@ -0,0 +1,5 @@ +INSERT IGNORE INTO `site` (`setting`, `value`) VALUES + ('intanidbupdate','7'), + ('lastanidbupdate','0'), + ('banned','0'); +UPDATE `tmux` SET `value` = '94' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0095~releases.sql b/resources/db/patches/0095~releases.sql new file mode 100644 index 000000000..816755638 --- /dev/null +++ b/resources/db/patches/0095~releases.sql @@ -0,0 +1,16 @@ +ALTER TABLE releases CHANGE COLUMN nzbstatus nzbstatus TINYINT(1) NOT NULL DEFAULT 0; +ALTER TABLE releases CHANGE COLUMN iscategorized iscategorized TINYINT(1) NOT NULL DEFAULT 0; +ALTER TABLE releases CHANGE COLUMN isrenamed isrenamed TINYINT(1) NOT NULL DEFAULT 0; +ALTER TABLE releases CHANGE COLUMN ishashed ishashed TINYINT(1) NOT NULL DEFAULT 0; +ALTER TABLE releases CHANGE COLUMN isrequestid isrequestid TINYINT(1) NOT NULL DEFAULT 0; +ALTER TABLE releases CHANGE COLUMN jpgstatus jpgstatus TINYINT(1) NOT NULL DEFAULT 0; +ALTER TABLE releases CHANGE COLUMN videostatus videostatus TINYINT(1) NOT NULL DEFAULT 0; +ALTER TABLE releases CHANGE COLUMN audiostatus audiostatus TINYINT(1) NOT NULL DEFAULT 0; +ALTER TABLE releases CHANGE COLUMN proc_pp proc_pp TINYINT(1) NOT NULL DEFAULT 0; +ALTER TABLE releases CHANGE COLUMN proc_sorter proc_sorter TINYINT(1) NOT NULL DEFAULT 0; +ALTER TABLE releases CHANGE COLUMN proc_par2 proc_par2 TINYINT(1) NOT NULL DEFAULT 0; +ALTER TABLE releases CHANGE COLUMN proc_nfo proc_nfo TINYINT(1) NOT NULL DEFAULT 0; +ALTER TABLE releases CHANGE COLUMN proc_files proc_files TINYINT(1) NOT NULL DEFAULT 0; + +UPDATE releases set isrequestid = 1 WHERE name REGEXP '^\\[ ?([[:digit:]]{4,6}) ?\\]|^REQ\s*([[:digit:]]{4,6})|^([[:digit:]]{4,6})-[[:digit:]]{1}\\[' AND isrequestid = 0; +UPDATE `tmux` SET `value` = '95' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0096~site.sql b/resources/db/patches/0096~site.sql new file mode 100644 index 000000000..f68adb36e --- /dev/null +++ b/resources/db/patches/0096~site.sql @@ -0,0 +1,9 @@ +INSERT IGNORE INTO `site` (`setting`, `value`) VALUES + ('grabstatus', 1), + ('crossposttime', 2), + ('deletepossiblerelease', 0), + ('grabstatus', 0), + ('nzbsplitlevel', 1), + ('maxsizetoformrelease', 0); + +UPDATE `tmux` set `value` = '96' where `setting` = 'sqlpatch'; diff --git a/resources/db/patches/0097~releases.sql b/resources/db/patches/0097~releases.sql new file mode 100644 index 000000000..ffebbecac --- /dev/null +++ b/resources/db/patches/0097~releases.sql @@ -0,0 +1,3 @@ +ALTER TABLE releases ADD COLUMN nzb_guid VARCHAR(50) NULL; +ALTER TABLE releases ADD INDEX ix_releases_nzb_guid (nzb_guid); +UPDATE `tmux` set `value` = '97' where `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0098~tmux.sql b/resources/db/patches/0098~tmux.sql new file mode 100644 index 000000000..4db4ea6ea --- /dev/null +++ b/resources/db/patches/0098~tmux.sql @@ -0,0 +1,4 @@ +INSERT IGNORE INTO tmux (setting, value) VALUES + ('dehash', '0'), + ('dehash_timer', '30'); +UPDATE `tmux` set `value` = '98' where `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0099~releases.sql b/resources/db/patches/0099~releases.sql new file mode 100644 index 000000000..5531fdd92 --- /dev/null +++ b/resources/db/patches/0099~releases.sql @@ -0,0 +1,60 @@ +DROP INDEX ix_releases_name_searchname_ft ON releases; +DROP INDEX ix_releases_guid ON releases; +DROP INDEX ix_releases_adddate ON releases; +DROP INDEX ix_releases_categoryid ON releases; +DROP INDEX ix_releases_rageid ON releases; +DROP INDEX ix_releases_imdbid ON releases; +DROP INDEX ix_releases_name ON releases; +DROP INDEX ix_releases_searchname ON releases; +DROP INDEX ix_releases_groupid ON releases; +DROP INDEX ix_releases_dehashstatus ON releases; +DROP INDEX ix_releases_prehashid ON releases; +DROP INDEX ix_releases_passwordstatus ON releases; +DROP INDEX ix_releases_reqidstatus ON releases; +DROP INDEX ix_releases_nfostatus ON releases; +DROP INDEX ix_releases_musicinfoid ON releases; +DROP INDEX ix_releases_consoleinfoid ON releases; +DROP INDEX ix_releases_bookinfoid ON releases; +DROP INDEX ix_releases_haspreview ON releases; +DROP INDEX ix_releases_status ON releases; +DROP INDEX ix_releases_postdate_searchname ON releases; +DROP INDEX ix_releases_postdate_name ON releases; +DROP INDEX ix_releases_nzb_guid ON releases; +DROP INDEX ix_releases_prehashid_searchname ON releases; +DROP INDEX idx_releases_multi_name_fromname_size ON releases; + +ALTER TABLE releases MODIFY id INT(11) UNSIGNED NOT NULL; +ALTER TABLE releases DROP PRIMARY KEY; +ALTER TABLE releases ADD PRIMARY KEY (id, categoryid); +ALTER TABLE releases MODIFY id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT; + +ALTER TABLE releases PARTITION BY RANGE (categoryid) ( +PARTITION unused VALUES LESS THAN (1000), +PARTITION console VALUES LESS THAN (2000), +PARTITION movies VALUES LESS THAN (3000), +PARTITION audio VALUES LESS THAN (4000), +PARTITION pc VALUES LESS THAN (5000), +PARTITION tv VALUES LESS THAN (6000), +PARTITION xxx VALUES LESS THAN (7000), +PARTITION books VALUES LESS THAN (8000), +PARTITION misc VALUES LESS THAN (9000) ); + +ALTER TABLE releases ADD INDEX ix_releases_adddate (adddate); +ALTER TABLE releases ADD INDEX ix_releases_rageid (rageid); +ALTER TABLE releases ADD INDEX ix_releases_imdbid (imdbid); +ALTER TABLE releases ADD INDEX ix_releases_guid (guid); +ALTER TABLE releases ADD INDEX ix_releases_name (name); +ALTER TABLE releases ADD INDEX ix_releases_groupid (groupid); +ALTER TABLE releases ADD INDEX ix_releases_dehashstatus (dehashstatus); +ALTER TABLE releases ADD INDEX ix_releases_reqidstatus (reqidstatus); +ALTER TABLE releases ADD INDEX ix_releases_nfostatus (nfostatus); +ALTER TABLE releases ADD INDEX ix_releases_musicinfoid (musicinfoid); +ALTER TABLE releases ADD INDEX ix_releases_consoleinfoid (consoleinfoid); +ALTER TABLE releases ADD INDEX ix_releases_bookinfoid (bookinfoid); +ALTER TABLE releases ADD INDEX ix_releases_haspreview_passwordstatus (haspreview, passwordstatus); +ALTER TABLE releases ADD INDEX ix_releases_status (nzbstatus, iscategorized, isrenamed, nfostatus, ishashed, isrequestid, passwordstatus, dehashstatus, reqidstatus, musicinfoid, consoleinfoid, bookinfoid, haspreview, categoryid, imdbid, rageid); +ALTER TABLE releases ADD INDEX ix_releases_postdate_searchname (postdate, searchname); +ALTER TABLE releases ADD INDEX ix_releases_nzb_guid (nzb_guid); +ALTER TABLE releases ADD INDEX ix_releases_prehash_searchname (prehashid, searchname); + +UPDATE tmux set value = '99' where setting = 'sqlpatch'; diff --git a/resources/db/patches/0100~binaries.sql b/resources/db/patches/0100~binaries.sql new file mode 100644 index 000000000..7e3ed464a --- /dev/null +++ b/resources/db/patches/0100~binaries.sql @@ -0,0 +1,5 @@ +DROP TRIGGER IF EXISTS delete_binaries; + +CREATE TRIGGER delete_binaries BEFORE DELETE ON binaries FOR EACH ROW BEGIN DELETE FROM parts WHERE binaryid = OLD.id; END; + +UPDATE tmux set value = '100' where setting = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0101~tmux.sql b/resources/db/patches/0101~tmux.sql new file mode 100644 index 000000000..18b5d9789 --- /dev/null +++ b/resources/db/patches/0101~tmux.sql @@ -0,0 +1,4 @@ +INSERT IGNORE INTO `tmux` (`setting`, `value`) VALUES + ('optimize', '0'), + ('optimize_timer', '86400'); +UPDATE tmux set value = '101' where setting = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0102~predb.sql b/resources/db/patches/0102~predb.sql new file mode 100644 index 000000000..9f009997b --- /dev/null +++ b/resources/db/patches/0102~predb.sql @@ -0,0 +1,2 @@ +ALTER TABLE `predb` drop `MD5`; +UPDATE tmux set value = '102' where setting = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0103~site.sql b/resources/db/patches/0103~site.sql new file mode 100644 index 000000000..6347448b3 --- /dev/null +++ b/resources/db/patches/0103~site.sql @@ -0,0 +1,7 @@ +INSERT IGNORE INTO `site` (`setting`, `value`) VALUES + ('intanidbupdate', 7), + ('lastanidbupdate', 0), + ('timeoutpath', ''), + ('timeoutseconds', 0); + +UPDATE `tmux` set `value` = '103' where `setting` = 'sqlpatch'; diff --git a/resources/db/patches/0104~releasecomment.sql b/resources/db/patches/0104~releasecomment.sql new file mode 100644 index 000000000..1b54065b9 --- /dev/null +++ b/resources/db/patches/0104~releasecomment.sql @@ -0,0 +1,4 @@ +ALTER TABLE releasecomment DROP INDEX ix_releasecomment_hash_releaseID; +ALTER TABLE releasecomment DROP INDEX ix_releasecomment_hash_gid_sourceid; +ALTER IGNORE TABLE releasecomment ADD UNIQUE INDEX ix_releasecomment_hash_gid (text_hash, gid); +UPDATE `tmux` set `value` = '104' where `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0105~site.sql b/resources/db/patches/0105~site.sql new file mode 100644 index 000000000..50f984b50 --- /dev/null +++ b/resources/db/patches/0105~site.sql @@ -0,0 +1,3 @@ +INSERT IGNORE INTO `site` (`setting`, `value`) VALUES + ('magic_file_path', ''); +UPDATE `tmux` set `value` = '105' where `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0106~category.sql b/resources/db/patches/0106~category.sql new file mode 100644 index 000000000..593c4e8d0 --- /dev/null +++ b/resources/db/patches/0106~category.sql @@ -0,0 +1,2 @@ +INSERT INTO category (id, title, parentid) VALUES (6080, 'SD', 6000); +UPDATE `tmux` SET `value` = '106' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0107~prehash.sql b/resources/db/patches/0107~prehash.sql new file mode 100644 index 000000000..937a83ad0 --- /dev/null +++ b/resources/db/patches/0107~prehash.sql @@ -0,0 +1,3 @@ +UPDATE `prehash` SET `predate` = CONCAT('2014', substr(predate, 5)) WHERE `predate` LIKE '%2015-12%'; +UPDATE `prehash` SET `predate` = CONCAT('2015', substr(predate, 5)) WHERE `predate` LIKE '%2016-01%'; +UPDATE `tmux` SET `value` = '107' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0108~category.sql b/resources/db/patches/0108~category.sql new file mode 100644 index 000000000..a366bc6b7 --- /dev/null +++ b/resources/db/patches/0108~category.sql @@ -0,0 +1,3 @@ +INSERT INTO category (id, title, parentid) VALUES (6041, 'HD Clips', 6000); +INSERT INTO category (id, title, parentid) VALUES (6042, 'SD Clips', 6000); +UPDATE `tmux` SET `value` = '108' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0109~category.sql b/resources/db/patches/0109~category.sql new file mode 100644 index 000000000..a02e80520 --- /dev/null +++ b/resources/db/patches/0109~category.sql @@ -0,0 +1,2 @@ +INSERT INTO category (id, title, parentid) VALUES (6090, 'WEB-DL', 6000); +UPDATE `tmux` SET `value` = '109' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0110~releases.sql b/resources/db/patches/0110~releases.sql new file mode 100644 index 000000000..c9702fe2f --- /dev/null +++ b/resources/db/patches/0110~releases.sql @@ -0,0 +1,2 @@ +ALTER TABLE releases ADD INDEX ix_releases_preid_searchname (preid, searchname); +UPDATE `tmux` SET `value` = '110' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0111~tmux.sql b/resources/db/patches/0111~tmux.sql new file mode 100644 index 000000000..0142588da --- /dev/null +++ b/resources/db/patches/0111~tmux.sql @@ -0,0 +1,2 @@ +INSERT IGNORE INTO `tmux` (`setting`, `value`) VALUES ('import_count','50000'); +UPDATE `tmux` SET `value` = '111' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0112~tmux.sql b/resources/db/patches/0112~tmux.sql new file mode 100644 index 000000000..a39a00c99 --- /dev/null +++ b/resources/db/patches/0112~tmux.sql @@ -0,0 +1,3 @@ +DELETE FROM `tmux` WHERE `setting` = 'max_load'; +DELETE FROM `tmux` WHERE `setting` = 'max_load_releases'; +UPDATE `tmux` set `value` = '112' where `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0113~general.sql b/resources/db/patches/0113~general.sql new file mode 100644 index 000000000..c71de0668 --- /dev/null +++ b/resources/db/patches/0113~general.sql @@ -0,0 +1,12 @@ +DROP PROCEDURE IF EXISTS alter_tables; +/* Create the stored procedure to alter tables -- change to myisam if version < 5.6 */ +CREATE PROCEDURE alter_tables() BEGIN SELECT version() regexp '^[0-5]\.[0-5]' into @version; IF @version = 1 THEN ALTER TABLE bookinfo engine=myisam; ALTER TABLE consoleinfo engine=myisam; ALTER TABLE musicinfo engine=myisam; END IF; END; +/* Execute the stored procedures */ +CALL alter_tables(); +/* Don't forget to drop the stored procedure when you're done! */ +DROP PROCEDURE IF EXISTS alter_tables; + +ALTER TABLE musicinfo ADD FULLTEXT INDEX ix_musicinfo_artist_title_ft (artist, title); +ALTER TABLE bookinfo ADD FULLTEXT INDEX ix_bookinfo_author_title_ft (author, title); +ALTER TABLE consoleinfo ADD FULLTEXT INDEX ix_consoleinfo_title_platform_ft (title, platform); +UPDATE `tmux` set `value` = '113' where `setting` = 'sqlpatch'; diff --git a/resources/db/patches/0114~movieinfo.sql b/resources/db/patches/0114~movieinfo.sql new file mode 100644 index 000000000..ddc1b16e0 --- /dev/null +++ b/resources/db/patches/0114~movieinfo.sql @@ -0,0 +1,2 @@ +ALTER TABLE movieinfo ADD COLUMN banner TINYINT(1) UNSIGNED NOT NULL DEFAULT '0'; +UPDATE `tmux` set `value` = '114' where `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0115~dnzb_downloads.sql b/resources/db/patches/0115~dnzb_downloads.sql new file mode 100644 index 000000000..8a553dd44 --- /dev/null +++ b/resources/db/patches/0115~dnzb_downloads.sql @@ -0,0 +1,13 @@ +DROP TABLE IF EXISTS dnzb_failures; +CREATE TABLE dnzb_failures ( + id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, + userid INT(11) UNSIGNED NOT NULL, + guid VARCHAR(50) NOT NULL, + PRIMARY KEY (id) +) + ENGINE =MYISAM + DEFAULT CHARSET =utf8 + COLLATE =utf8_unicode_ci + AUTO_INCREMENT =1; + CREATE UNIQUE INDEX ux_dnzb_failures ON dnzb_failures (userid, guid); + UPDATE `tmux` set `value` = '115' where `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0116~site.sql b/resources/db/patches/0116~site.sql new file mode 100644 index 000000000..469fe781d --- /dev/null +++ b/resources/db/patches/0116~site.sql @@ -0,0 +1,3 @@ +INSERT IGNORE INTO `site` (`setting`, `value`) VALUES +('request_url', 'http://reqid.newznab-tmux.pw/'); +UPDATE `tmux` SET `value` = '116' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0117~blacklist.sql b/resources/db/patches/0117~blacklist.sql new file mode 100644 index 000000000..9a6d8fcee --- /dev/null +++ b/resources/db/patches/0117~blacklist.sql @@ -0,0 +1,2 @@ +insert into binaryblacklist (groupname, msgcol, regex, description) VALUES ('alt.binaries.*', '2', 'DVD@Freakz\.net|DVD@Frz\.net|DVD@Hookie\.com|DVDz@FZ\.net|DVDZ@MOvIEs\.net|emixface@gmail\.com|Firm@DVD\.net|Frkz@XviD\.net|HD@movies\.com|ilove@movies\.com|ILOVE@MOvIEs\.net|info@dvd\.et|info@XviD\.net|info@xvid2\.net|max0204@gmail\.com|moovee@4u\.tv|Movie@Freaks\.net|Movie@post\.com|Movie@ZL\.net|Movies@movie\.net|moviess@mov\.net|Moviez@XviD\.com|MOVZ@rel\.com|power@live\.de|Power@post\.com|Ran@Movies\.com|RD@mov\.net|seti312@gmail\.com|TOP@imdbmovies\.com|USER@domain\.com|VIDZ@pwrpst\.net|XviD@movies\.net|Xvid@pwrpst\.net|XviD@world\.net|XvidZ@MOvIEs\.net|Xvidz@video\.net|moviess@movies\.net|Para@tropz\.com|Mov@ing\.com|MV@ing\.com|HDMovies@love\.com|Daco@Co\.com|dfrebgf@frednmp\.com|Xvido@Co\.com|movies@montain\.com|mov@ies\.com|movies@movie\.com', 'codec poster'); +UPDATE `tmux` SET `value` = '117' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0118~site.sql b/resources/db/patches/0118~site.sql new file mode 100644 index 000000000..ade424da6 --- /dev/null +++ b/resources/db/patches/0118~site.sql @@ -0,0 +1,2 @@ +DELETE FROM site WHERE setting = 'rottentomatoquality'; +UPDATE `tmux` SET `value` = '118' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0119~users.sql b/resources/db/patches/0119~users.sql new file mode 100644 index 000000000..30d72451c --- /dev/null +++ b/resources/db/patches/0119~users.sql @@ -0,0 +1,4 @@ +ALTER TABLE users ADD COLUMN style VARCHAR(255) NULL DEFAULT NULL; +/* Add a column to pick a site theme */ + +UPDATE `tmux` SET `value` = '119' WHERE `setting` = 'sqlpatch'; diff --git a/resources/db/patches/0120~site.sql b/resources/db/patches/0120~site.sql new file mode 100644 index 000000000..769c84d4c --- /dev/null +++ b/resources/db/patches/0120~site.sql @@ -0,0 +1,2 @@ +INSERT INTO `site` (`setting`, `value`) VALUES ('userselstyle', '0'); +UPDATE `tmux` SET `value` = '120' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/resources/db/patches/0121~site.sql b/resources/db/patches/0121~site.sql new file mode 100644 index 000000000..0307cfa15 --- /dev/null +++ b/resources/db/patches/0121~site.sql @@ -0,0 +1,2 @@ +INSERT INTO `site` (`setting`, `value`) VALUES ('processthumbnails', '0'); +UPDATE `tmux` SET `value` = '121' WHERE `setting` = 'sqlpatch'; \ No newline at end of file