diff --git a/src/ui/conf/confmanager.cpp b/src/ui/conf/confmanager.cpp index f96d870f..514ecc93 100644 --- a/src/ui/conf/confmanager.cpp +++ b/src/ui/conf/confmanager.cpp @@ -32,7 +32,7 @@ namespace { const QLoggingCategory LC("conf"); -constexpr int DATABASE_USER_VERSION = 35; +constexpr int DATABASE_USER_VERSION = 36; const char *const sqlSelectAddressGroups = "SELECT addr_group_id, include_all, exclude_all," " include_zones, exclude_zones," diff --git a/src/ui/conf/migrations/1.sql b/src/ui/conf/migrations/1.sql index bfa3bdb5..835a2f52 100644 --- a/src/ui/conf/migrations/1.sql +++ b/src/ui/conf/migrations/1.sql @@ -98,7 +98,7 @@ CREATE TABLE rule( mod_time INTEGER NOT NULL ); -CREATE INDEX rule_rule_type_name_idx ON rule(rule_type, name); +CREATE INDEX rule_rule_type_name_idx ON rule(rule_type, lower(name)); CREATE TABLE app_rule( app_rule_id INTEGER PRIMARY KEY, diff --git a/src/ui/model/rulelistmodel.cpp b/src/ui/model/rulelistmodel.cpp index 46afdf26..b4ebf85a 100644 --- a/src/ui/model/rulelistmodel.cpp +++ b/src/ui/model/rulelistmodel.cpp @@ -240,5 +240,5 @@ QString RuleListModel::sqlWhereFts() const QString RuleListModel::sqlOrderColumn() const { - return "t.name"; + return "rule_type, lower(name)"; }