BOD-5 #comment Data level changes to support audit trails. Only enabled for jobs. Potentially big impact changes from this commit forward. Details logged in reference file.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
[]
|
||||
15
hasura/migrations/1583795241718_run_sql_migration/up.yaml
Normal file
15
hasura/migrations/1583795241718_run_sql_migration/up.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: "CREATE TABLE audit_trail (\r\n \r\n id serial PRIMARY
|
||||
KEY, \r\n \r\n created timestamp DEFAULT now(),\r\n
|
||||
\r\n schemaname text,\r\n \r\n tabname text,\r\n
|
||||
\r\n operation text,\r\n recordid uuid,\r\n \r\n
|
||||
\ -- who text DEFAULT current_user,\r\n \r\n new_val
|
||||
\ json,\r\n \r\n old_val json,\r\n
|
||||
\ useremail text,\r\n bodyshopid uuid\r\n \r\n);"
|
||||
type: run_sql
|
||||
- args:
|
||||
name: audit_trail
|
||||
schema: public
|
||||
type: add_existing_table_or_view
|
||||
Reference in New Issue
Block a user