From f28d2bae0935745c1c74ea38f2ee083f3fd4bf9d Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Thu, 12 Sep 2019 13:08:56 +0200 Subject: [PATCH] Drop indexes --- app/SQL/install.sql.pgsql.php | 6 +++++- app/SQL/install.sql.sqlite.php | 9 +++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/app/SQL/install.sql.pgsql.php b/app/SQL/install.sql.pgsql.php index ef08ca940..05ee85272 100644 --- a/app/SQL/install.sql.pgsql.php +++ b/app/SQL/install.sql.pgsql.php @@ -106,4 +106,8 @@ define( WHERE NOT EXISTS (SELECT id FROM "%1$sfeed" WHERE url = :url);' ); -define('SQL_DROP_TABLES', 'DROP TABLE IF EXISTS "%1$sentrytag", "%1$stag", "%1$sentrytmp", "%1$sentry", "%1$sfeed", "%1$scategory"'); +global $SQL_DROP_TABLES; +$SQL_DROP_TABLES = [ + 'DROP TABLE IF EXISTS "%1$sentrytag", "%1$stag", "%1$sentrytmp", "%1$sentry", "%1$sfeed", "%1$scategory"', + 'DROP INDEX IF EXISTS "%1$sentrytag_id_entry_index", "%1$sentry_feed_read_index", "%1$sentrytmp_date_index", "%1$sentry_lastSeen_index", "%1$sis_read_index", "%1$sis_favorite_index", "%1$skeep_history_index", "%1$spriority_index", "%1$sname_index"', +]; diff --git a/app/SQL/install.sql.sqlite.php b/app/SQL/install.sql.sqlite.php index 88de84358..8d8ed45ab 100644 --- a/app/SQL/install.sql.sqlite.php +++ b/app/SQL/install.sql.sqlite.php @@ -113,4 +113,13 @@ $SQL_DROP_TABLES = [ 'DROP TABLE IF EXISTS `entry`', 'DROP TABLE IF EXISTS `feed`', 'DROP TABLE IF EXISTS `category`', + 'DROP INDEX IF EXISTS `entrytag_id_entry_index`', + 'DROP INDEX IF EXISTS `entry_feed_read_index`', + 'DROP INDEX IF EXISTS `entrytmp_date_index`', + 'DROP INDEX IF EXISTS `entry_lastSeen_index`', + 'DROP INDEX IF EXISTS `entry_is_read_index`', + 'DROP INDEX IF EXISTS `entry_is_favorite_index`', + 'DROP INDEX IF EXISTS `feed_keep_history_index`', + 'DROP INDEX IF EXISTS `feed_priority_index`', + 'DROP INDEX IF EXISTS `feed_name_index`', ];