UI: Rules: Sort by name

This commit is contained in:
Nodir Temirkhodjaev 2024-03-09 12:50:02 +03:00
parent c1421f00b1
commit 01ef3e70d8
3 changed files with 3 additions and 3 deletions

View File

@ -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,"

View File

@ -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,

View File

@ -240,5 +240,5 @@ QString RuleListModel::sqlWhereFts() const
QString RuleListModel::sqlOrderColumn() const
{
return "t.name";
return "rule_type, lower(name)";
}