diff options
| author | 2019-10-06 00:14:19 +0200 | |
|---|---|---|
| committer | 2019-10-06 00:14:19 +0200 | |
| commit | be4c942cb3bd2b41dc2e01eb437dfd4f2f73ab4a (patch) | |
| tree | 164475741f79c2057db1c956dcf77e720835654a /app/SQL/install.sql.sqlite.php | |
| parent | 1b15e22897c9190a75be33698764d625a7813cb2 (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.sqlite.php')
| -rw-r--r-- | app/SQL/install.sql.sqlite.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/app/SQL/install.sql.sqlite.php b/app/SQL/install.sql.sqlite.php index 81370ce56..d3a5e0697 100644 --- a/app/SQL/install.sql.sqlite.php +++ b/app/SQL/install.sql.sqlite.php @@ -55,10 +55,15 @@ CREATE TABLE IF NOT EXISTS `entry` ( CREATE INDEX IF NOT EXISTS entry_is_favorite_index ON `entry`(`is_favorite`); CREATE INDEX IF NOT EXISTS entry_is_read_index ON `entry`(`is_read`); CREATE INDEX IF NOT EXISTS entry_lastSeen_index ON `entry`(`lastSeen`); -- //v1.1.1 +CREATE INDEX IF NOT EXISTS entry_feed_read_index ON `entry`(`id_feed`,`is_read`); -- v1.7 INSERT OR IGNORE INTO `category` (id, name) VALUES(1, "Uncategorized"); SQL; +const SQL_CREATE_INDEX_ENTRY_1 = <<<'SQL' +CREATE INDEX IF NOT EXISTS 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, @@ -79,9 +84,6 @@ CREATE TABLE IF NOT EXISTS `entrytmp` ( -- v1.7 UNIQUE (`id_feed`,`guid`) ); CREATE INDEX IF NOT EXISTS entrytmp_date_index ON `entrytmp`(`date`); - --- v1.7 -CREATE INDEX IF NOT EXISTS `entry_feed_read_index` ON `entry`(`id_feed`,`is_read`); SQL; const SQL_CREATE_TABLE_TAGS = <<<'SQL' @@ -98,7 +100,7 @@ CREATE TABLE IF NOT EXISTS `entrytag` ( FOREIGN KEY (`id_tag`) REFERENCES `tag` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, FOREIGN KEY (`id_entry`) REFERENCES `entry` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ); -CREATE INDEX entrytag_id_entry_index ON `entrytag` (`id_entry`); +CREATE INDEX IF NOT EXISTS entrytag_id_entry_index ON `entrytag` (`id_entry`); SQL; const SQL_INSERT_FEED = <<<'SQL' |
