forked from sakaiproject/sakai
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SAK-33430 use a proper index on site_id because queries are against s…
…ite_id (sakaiproject#4871)
- Loading branch information
Showing
3 changed files
with
10 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
-- SAK-23634 - new table to track user add/drop/update actions done in sites | ||
CREATE TABLE user_audits_log ( | ||
id bigint generated by default as identity (start with 1), | ||
site_id VARCHAR(255) NOT NULL, | ||
site_id VARCHAR(99) NOT NULL, | ||
user_id VARCHAR(99) NOT NULL, | ||
role_name VARCHAR(255) NOT NULL, | ||
role_name VARCHAR(99) NOT NULL, | ||
action_taken VARCHAR(1) NOT NULL, | ||
audit_stamp TIMESTAMP NOT NULL, | ||
source VARCHAR(1), | ||
action_user_id VARCHAR(99), | ||
PRIMARY KEY(id) | ||
); | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
-- SAK-23634 - new table to track user add/drop/update actions done in sites | ||
CREATE TABLE user_audits_log ( | ||
id BIGINT AUTO_INCREMENT NOT NULL, | ||
site_id VARCHAR(255) NOT NULL, | ||
site_id VARCHAR(99) NOT NULL, | ||
user_id VARCHAR(99) NOT NULL, | ||
role_name VARCHAR(255) NOT NULL, | ||
role_name VARCHAR(99) NOT NULL, | ||
action_taken VARCHAR(1) NOT NULL, | ||
audit_stamp TIMESTAMP NOT NULL, | ||
source VARCHAR(1), | ||
action_user_id VARCHAR(99), | ||
PRIMARY KEY(id) | ||
); | ||
|
||
CREATE INDEX user_audits_log_index ON user_audits_log (id,site_id); | ||
CREATE INDEX user_audits_log_index ON user_audits_log (site_id); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
-- SAK-23634 - new table to track user add/drop/update actions done in sites | ||
CREATE TABLE user_audits_log ( | ||
id NUMBER(19,0) NOT NULL, | ||
site_id VARCHAR2(255) NOT NULL, | ||
site_id VARCHAR2(99) NOT NULL, | ||
user_id VARCHAR2(99) NOT NULL, | ||
role_name VARCHAR2(255) NOT NULL, | ||
role_name VARCHAR2(99) NOT NULL, | ||
action_taken VARCHAR2(1) NOT NULL, | ||
audit_stamp TIMESTAMP NOT NULL, | ||
source VARCHAR2(1), | ||
action_user_id VARCHAR2(99), | ||
PRIMARY KEY(id) | ||
); | ||
|
||
CREATE INDEX user_audits_log_index ON user_audits_log (id,site_id); | ||
CREATE INDEX user_audits_log_index ON user_audits_log (site_id); | ||
|
||
CREATE SEQUENCE user_audits_log_seq; | ||
CREATE SEQUENCE user_audits_log_seq; |