Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit 619e22b

Browse files
committed
pg and sqlite sql updates
1 parent 5afb0bf commit 619e22b

File tree

4 files changed

+33
-4
lines changed

4 files changed

+33
-4
lines changed

core/src/plugins/conf.sql/create.pgsql

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,12 @@ CREATE INDEX ajxp_repo_options_uuid_idx ON ajxp_repo_options (uuid);
5959
CREATE TABLE ajxp_roles (
6060
role_id varchar(255) PRIMARY KEY,
6161
serial_role bytea NOT NULL,
62-
searchable_repositories text
62+
searchable_repositories text,
63+
last_updated INTEGER NOT NULL DEFAULT 0
6364
);
6465

66+
CREATE INDEX roles_updated_idx ON ajxp_roles(last_updated);
67+
6568
CREATE TABLE ajxp_groups (
6669
"groupPath" varchar(255) PRIMARY KEY,
6770
"groupLabel" varchar(255) NOT NULL

core/src/plugins/conf.sql/create.sqlite

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,13 @@ CREATE TABLE IF NOT EXISTS ajxp_repo_options (
5454
CREATE TABLE IF NOT EXISTS ajxp_roles (
5555
role_id text NOT NULL,
5656
serial_role blob NOT NULL,
57-
searchable_repositories text
57+
searchable_repositories text,
58+
last_updated INT(11)
5859
);
5960

61+
CREATE INDEX roles_updated_idx ON ajxp_roles(last_updated);
62+
63+
6064
CREATE TABLE IF NOT EXISTS ajxp_groups (
6165
groupPath text NOT NULL,
6266
groupLabel text NOT NULL

core/src/plugins/log.sql/create.pgsql

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,16 @@ CREATE TABLE ajxp_log (
1414
"user" varchar(255),
1515
source varchar(255),
1616
message text,
17-
params text
17+
params text,
18+
repository_id VARCHAR(32),
19+
device VARCHAR(255),
20+
dirname VARCHAR(255),
21+
basename VARCHAR(255)
1822
);
23+
24+
CREATE INDEX log_date_idx ON ajxp_log(logdate);
25+
CREATE INDEX log_repository_id_idx ON ajxp_log(repository_id);
26+
CREATE INDEX log_dirname_idx ON ajxp_log(dirname);
27+
CREATE INDEX log_basename_idx ON ajxp_log(basename);
28+
CREATE INDEX log_severity_idx ON ajxp_log(severity);
29+
CREATE INDEX log_source_idx ON ajxp_log(source);

core/src/plugins/log.sql/create.sqlite

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,16 @@ CREATE TABLE IF NOT EXISTS ajxp_log (
66
"user" text DEFAULT NULL,
77
source text DEFAULT NULL,
88
message text DEFAULT NULL,
9-
params text DEFAULT NULL
9+
params text DEFAULT NULL,
10+
repository_id text DEFAULT NULL,
11+
dirname text DEFAULT NULL,
12+
basename text DEFAULT NULL,
13+
device text DEFAULT NULL
1014
);
15+
16+
CREATE INDEX log_date_idx ON ajxp_log(logdate);
17+
CREATE INDEX log_repository_id_idx ON ajxp_log(repository_id);
18+
CREATE INDEX log_dirname_idx ON ajxp_log(dirname);
19+
CREATE INDEX log_basename_idx ON ajxp_log(basename);
20+
CREATE INDEX log_severity_idx ON ajxp_log(severity);
21+
CREATE INDEX log_source_idx ON ajxp_log(source);

0 commit comments

Comments
 (0)