aboutsummaryrefslogtreecommitdiff
path: root/app/SQL
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2017-03-26 14:07:06 +0200
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2017-03-26 14:07:06 +0200
commite956aee53d561fbdc11a78a50ad7cc041108e5b5 (patch)
tree2ebad34d81f49f3ac3cbc1568e13e60f9659d55a /app/SQL
parenta20fd9db9f0ed0e27c65671bb10402ced10587b1 (diff)
More defered insertion. New SQL index
New index entry_feed_read_index TODO: Auto add this index to existing version
Diffstat (limited to 'app/SQL')
-rw-r--r--app/SQL/install.sql.mysql.php1
-rw-r--r--app/SQL/install.sql.pgsql.php1
-rw-r--r--app/SQL/install.sql.sqlite.php1
3 files changed, 3 insertions, 0 deletions
diff --git a/app/SQL/install.sql.mysql.php b/app/SQL/install.sql.mysql.php
index f42e08ad3..3ad68173f 100644
--- a/app/SQL/install.sql.mysql.php
+++ b/app/SQL/install.sql.mysql.php
@@ -55,6 +55,7 @@ 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 //TODO: Auto add this index to existing version
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
ENGINE = INNODB;
diff --git a/app/SQL/install.sql.pgsql.php b/app/SQL/install.sql.pgsql.php
index 1a666cb8a..ca4dfa925 100644
--- a/app/SQL/install.sql.pgsql.php
+++ b/app/SQL/install.sql.pgsql.php
@@ -50,6 +50,7 @@ $SQL_CREATE_TABLES = array(
'CREATE INDEX %1$sis_favorite_index ON "%1$sentry" ("is_favorite");',
'CREATE INDEX %1$sis_read_index ON "%1$sentry" ("is_read");',
'CREATE INDEX %1$sentry_lastSeen_index ON "%1$sentry" ("lastSeen");',
+'CREATE INDEX %1$sentry_feed_read_index ON "%1$sentry" ("id_feed","is_read");', //v1.7 //TODO: Auto add this index to existing version
'INSERT INTO "%1$scategory" (name) SELECT \'%2$s\' WHERE NOT EXISTS (SELECT id FROM "%1$scategory" WHERE id = 1);',
);
diff --git a/app/SQL/install.sql.sqlite.php b/app/SQL/install.sql.sqlite.php
index ad7d525fd..dcb7a351a 100644
--- a/app/SQL/install.sql.sqlite.php
+++ b/app/SQL/install.sql.sqlite.php
@@ -53,6 +53,7 @@ $SQL_CREATE_TABLES = array(
'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 //TODO: Auto add this index to existing version
'INSERT OR IGNORE INTO `category` (id, name) VALUES(1, "%2$s");',
);