From e2076e8571a9f3bb2c9b9370e37ac4c8f77ff1eb Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Mon, 22 Apr 2013 22:41:20 -0400 Subject: [PATCH] Add index on status column --- miniflux/common.php | 2 +- miniflux/schema.php | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/miniflux/common.php b/miniflux/common.php index 6216aeb..7c0e222 100644 --- a/miniflux/common.php +++ b/miniflux/common.php @@ -10,7 +10,7 @@ require 'schema.php'; require 'model.php'; -const DB_VERSION = 3; +const DB_VERSION = 4; const APP_VERSION = 'master'; const APP_USERAGENT = 'Miniflux - http://miniflux.net'; const HTTP_TIMEOUT = 5; diff --git a/miniflux/schema.php b/miniflux/schema.php index 74dd7c1..4007577 100644 --- a/miniflux/schema.php +++ b/miniflux/schema.php @@ -3,6 +3,12 @@ namespace Schema; +function version_4($pdo) +{ + $pdo->exec("CREATE INDEX idx_status ON items(status)"); +} + + function version_3($pdo) { $pdo->exec("ALTER TABLE config ADD COLUMN language TEXT DEFAULT 'en_US'");