summaryrefslogtreecommitdiff
path: root/app/SQL/install.sql.mysql.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2017-06-03 15:18:04 +0200
committerGravatar GitHub <noreply@github.com> 2017-06-03 15:18:04 +0200
commitfd43ee546e419fc9fbb9a3ad974d2234d94cffaa (patch)
tree2df9fd1daf5b994d7bbde8dd46f7605e4370c268 /app/SQL/install.sql.mysql.php
parentbe0bcfef7e38f27284ec7b377b342ba389515964 (diff)
parent6f3653d430c86b026f8e007a276fdba2b09b61b3 (diff)
Merge pull request #1549 from FreshRSS/dev1.7.0
Version 1.7.0
Diffstat (limited to 'app/SQL/install.sql.mysql.php')
-rw-r--r--app/SQL/install.sql.mysql.php28
1 files changed, 27 insertions, 1 deletions
diff --git a/app/SQL/install.sql.mysql.php b/app/SQL/install.sql.mysql.php
index a454829d5..09defd452 100644
--- a/app/SQL/install.sql.mysql.php
+++ b/app/SQL/install.sql.mysql.php
@@ -55,18 +55,44 @@ CREATE TABLE IF NOT EXISTS `%1$sentry` (
INDEX (`is_favorite`), -- v0.7
INDEX (`is_read`), -- v0.7
INDEX `entry_lastSeen_index` (`lastSeen`) -- v1.1.1
+ -- INDEX `entry_feed_read_index` (`id_feed`,`is_read`) -- v1.7 Located futher down
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
ENGINE = INNODB;
INSERT IGNORE INTO `%1$scategory` (id, name) VALUES(1, "%2$s");
');
+define('SQL_CREATE_TABLE_ENTRYTMP', '
+CREATE TABLE IF NOT EXISTS `%1$sentrytmp` ( -- v1.7
+ `id` bigint NOT NULL,
+ `guid` varchar(760) CHARACTER SET latin1 NOT NULL,
+ `title` varchar(255) NOT NULL,
+ `author` varchar(255),
+ `content_bin` blob,
+ `link` varchar(1023) CHARACTER SET latin1 NOT NULL,
+ `date` int(11),
+ `lastSeen` INT(11) DEFAULT 0,
+ `hash` BINARY(16),
+ `is_read` boolean NOT NULL DEFAULT 0,
+ `is_favorite` boolean NOT NULL DEFAULT 0,
+ `id_feed` SMALLINT,
+ `tags` varchar(1023),
+ PRIMARY KEY (`id`),
+ FOREIGN KEY (`id_feed`) REFERENCES `%1$sfeed`(`id`) ON DELETE CASCADE ON UPDATE CASCADE,
+ UNIQUE KEY (`id_feed`,`guid`),
+ INDEX (`date`)
+) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
+ENGINE = INNODB;
+
+CREATE INDEX `entry_feed_read_index` ON `%1$sentry`(`id_feed`,`is_read`); -- v1.7 Located here to be auto-added
+');
+
define('SQL_INSERT_FEEDS', '
INSERT IGNORE INTO `%1$sfeed` (url, category, name, website, description, ttl) VALUES("http://freshrss.org/feeds/all.atom.xml", 1, "FreshRSS.org", "http://freshrss.org/", "FreshRSS, a free, self-hostable aggregator…", 86400);
INSERT IGNORE INTO `%1$sfeed` (url, category, name, website, description, ttl) VALUES("https://github.com/FreshRSS/FreshRSS/releases.atom", 1, "FreshRSS @ GitHub", "https://github.com/FreshRSS/FreshRSS/", "FreshRSS releases @ GitHub", 86400);
');
-define('SQL_DROP_TABLES', 'DROP TABLE IF EXISTS `%1$sentry`, `%1$sfeed`, `%1$scategory`');
+define('SQL_DROP_TABLES', 'DROP TABLE IF EXISTS `%1$sentrytmp`, `%1$sentry`, `%1$sfeed`, `%1$scategory`');
define('SQL_UPDATE_UTF8MB4', '
ALTER DATABASE `%2$s` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;