UI: Conf: Add indexes to rules' schema

Default action is from the app or app's group, not policy.
This commit is contained in:
Nodir Temirkhodjaev 2022-03-05 18:42:15 +03:00
parent 3803d86388
commit 5ad21c7c83

View File

@ -45,7 +45,6 @@ CREATE TABLE policy(
policy_id INTEGER PRIMARY KEY, policy_id INTEGER PRIMARY KEY,
is_preset BOOLEAN NOT NULL, is_preset BOOLEAN NOT NULL,
enabled BOOLEAN NOT NULL, enabled BOOLEAN NOT NULL,
block BOOLEAN NOT NULL,
name TEXT NOT NULL name TEXT NOT NULL
); );
@ -56,6 +55,8 @@ CREATE TABLE policy_rule(
order_index INTEGER NOT NULL order_index INTEGER NOT NULL
); );
CREATE INDEX policy_rule_policy_id_idx ON policy_rule(policy_id);
CREATE TABLE policy_set( CREATE TABLE policy_set(
policy_set_id INTEGER PRIMARY KEY, policy_set_id INTEGER PRIMARY KEY,
policy_id INTEGER NOT NULL, policy_id INTEGER NOT NULL,
@ -63,6 +64,8 @@ CREATE TABLE policy_set(
order_index INTEGER NOT NULL order_index INTEGER NOT NULL
); );
CREATE INDEX policy_set_policy_id_idx ON policy_set(policy_id);
CREATE TABLE policy_list( CREATE TABLE policy_list(
policy_list_id INTEGER PRIMARY KEY, policy_list_id INTEGER PRIMARY KEY,
type INTEGER NOT NULL, -- preset_lib, preset_app, global_before_app, global_after_app type INTEGER NOT NULL, -- preset_lib, preset_app, global_before_app, global_after_app
@ -70,6 +73,9 @@ CREATE TABLE policy_list(
order_index INTEGER NOT NULL order_index INTEGER NOT NULL
); );
CREATE INDEX policy_list_type_idx ON policy_list(type);
CREATE INDEX policy_list_policy_id_idx ON policy_list(policy_id);
CREATE TABLE policy_menu( CREATE TABLE policy_menu(
policy_menu_id INTEGER PRIMARY KEY, policy_menu_id INTEGER PRIMARY KEY,
exclusive BOOLEAN NOT NULL, exclusive BOOLEAN NOT NULL,
@ -82,6 +88,8 @@ CREATE TABLE policy_menu_set(
policy_id INTEGER NOT NULL policy_id INTEGER NOT NULL
); );
CREATE INDEX policy_menu_set_policy_id_idx ON policy_menu_set(policy_id);
CREATE TABLE app_group( CREATE TABLE app_group(
app_group_id INTEGER PRIMARY KEY, app_group_id INTEGER PRIMARY KEY,
order_index INTEGER NOT NULL, order_index INTEGER NOT NULL,