aboutsummaryrefslogtreecommitdiff
path: root/app/SQL/install.sql.mysql.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2019-10-06 00:14:19 +0200
committerGravatar GitHub <noreply@github.com> 2019-10-06 00:14:19 +0200
commitbe4c942cb3bd2b41dc2e01eb437dfd4f2f73ab4a (patch)
tree164475741f79c2057db1c956dcf77e720835654a /app/SQL/install.sql.mysql.php
parent1b15e22897c9190a75be33698764d625a7813cb2 (diff)
SQL allow recreating existing user (#2555)
* SQL allow recreating existing user Taking advantage of https://github.com/FreshRSS/FreshRSS/pull/2554 In a case when FreshRSS data is lost, but database data still intact (in particular MySQL or PostgreSQL), this patch allows recreating previous users without error * Better error retrieval Especially when error occur during the prepare statement
Diffstat (limited to 'app/SQL/install.sql.mysql.php')
-rw-r--r--app/SQL/install.sql.mysql.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/app/SQL/install.sql.mysql.php b/app/SQL/install.sql.mysql.php
index a5db1b216..87b5d1989 100644
--- a/app/SQL/install.sql.mysql.php
+++ b/app/SQL/install.sql.mysql.php
@@ -57,14 +57,18 @@ CREATE TABLE IF NOT EXISTS `_entry` (
UNIQUE KEY (`id_feed`,`guid`), -- v0.7
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
+ INDEX `entry_lastSeen_index` (`lastSeen`), -- v1.1.1
+ INDEX `entry_feed_read_index` (`id_feed`,`is_read`) -- v1.7
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
ENGINE = INNODB;
INSERT IGNORE INTO `_category` (id, name) VALUES(1, "Uncategorized");
SQL;
+const SQL_CREATE_INDEX_ENTRY_1 = <<<'SQL'
+CREATE INDEX `entry_feed_read_index` ON `_entry` (`id_feed`,`is_read`); -- v1.7
+SQL;
+
const SQL_CREATE_TABLE_ENTRYTMP = <<<'SQL'
CREATE TABLE IF NOT EXISTS `_entrytmp` ( -- v1.7
`id` BIGINT NOT NULL,
@@ -86,9 +90,6 @@ CREATE TABLE IF NOT EXISTS `_entrytmp` ( -- v1.7
INDEX (`date`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
ENGINE = INNODB;
-
--- v1.7 Located here to be auto-added
-CREATE INDEX `entry_feed_read_index` ON `_entry`(`id_feed`,`is_read`);
SQL;
const SQL_CREATE_TABLE_TAGS = <<<'SQL'