-
Notifications
You must be signed in to change notification settings - Fork 321
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Write migration for audit logs table
This commit contains the migration for the audit logs table. It contains a mirrored Rust struct with an insertion method. None of the Rust code replaces what exists in "si-frontend-types" or "si-events" but may do so in the future. Signed-off-by: Nick Gerace <[email protected]>
- Loading branch information
1 parent
257e517
commit f3b0e34
Showing
6 changed files
with
184 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
CREATE TABLE audit_logs ( | ||
pk bigserial PRIMARY KEY, | ||
workspace_id text NOT NULL, | ||
kind text NOT NULL, | ||
timestamp timestamp with time zone NOT NULL, | ||
title text NOT NULL, | ||
change_set_id text, | ||
user_id text, | ||
entity_name text, | ||
entity_type text, | ||
metadata jsonb | ||
); | ||
|
||
CREATE INDEX audit_logs_workspace_and_change_set ON audit_logs (workspace_id, change_set_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