-
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.
the end date is set to 1st of next month as the upperbound is excluded
- Loading branch information
Showing
7 changed files
with
77 additions
and
17 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
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
60 changes: 60 additions & 0 deletions
60
src/Altinn.Auth.AuditLog.Persistence/Migration/v0.03/01-setup-tables.sql
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 |
---|---|---|
@@ -0,0 +1,60 @@ | ||
|
||
-- Table: authentication.eventlogv2 | ||
CREATE TABLE IF NOT EXISTS authentication.eventlogv2 | ||
( | ||
sessionid text, | ||
externalsessionid text, | ||
subscriptionkey text, | ||
externaltokenissuer text, | ||
created timestamp with time zone NOT NULL, | ||
userid integer, | ||
supplierid text, | ||
orgnumber integer, | ||
eventtypeid integer, | ||
authenticationmethodid integer, | ||
authenticationlevelid integer, | ||
ipaddress text, | ||
isauthenticated boolean NOT NULL, | ||
CONSTRAINT authenticationeventtype_fkey FOREIGN KEY (eventtypeid) | ||
REFERENCES authentication.authenticationeventtype (authenticationeventtypeid) MATCH SIMPLE | ||
ON UPDATE NO ACTION | ||
ON DELETE NO ACTION | ||
NOT VALID, | ||
CONSTRAINT authenticationlevel_fkey FOREIGN KEY (authenticationlevelid) | ||
REFERENCES authentication.authenticationlevel (authenticationlevelid) MATCH SIMPLE | ||
ON UPDATE NO ACTION | ||
ON DELETE NO ACTION | ||
NOT VALID, | ||
CONSTRAINT authenticationmethod_fkey FOREIGN KEY (authenticationmethodid) | ||
REFERENCES authentication.authenticationmethod (authenticationmethodid) MATCH SIMPLE | ||
ON UPDATE NO ACTION | ||
ON DELETE NO ACTION | ||
NOT VALID | ||
) PARTITION BY RANGE (created); | ||
|
||
CREATE INDEX ON authentication.eventlogv2 (created); | ||
|
||
-- Table: authz.eventlogv2 | ||
CREATE TABLE IF NOT EXISTS authz.eventlogv2 | ||
( | ||
sessionid text, | ||
created timestamp with time zone NOT NULL, | ||
subjectuserid INTEGER, | ||
subjectorgcode text, | ||
subjectorgnumber INTEGER, | ||
subjectparty INTEGER, | ||
resourcepartyid INTEGER, | ||
resource text, | ||
instanceid text, | ||
operation text, | ||
ipaddress text, | ||
contextrequestjson jsonb, | ||
decision integer, | ||
CONSTRAINT authzdecisionid_fkey FOREIGN KEY (decision) | ||
REFERENCES authz.decision (decisionid) MATCH SIMPLE | ||
ON UPDATE NO ACTION | ||
ON DELETE NO ACTION | ||
NOT VALID | ||
) PARTITION BY RANGE (created); | ||
|
||
CREATE INDEX ON authz.eventlogv2 (created); |
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
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
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
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