From b9a68ad8206004394f1bb532c04ace63a5347411 Mon Sep 17 00:00:00 2001 From: Jay Allen <107942890+jallentxbiomed@users.noreply.github.com> Date: Tue, 27 Jun 2023 16:53:06 -0500 Subject: [PATCH] added auditLogging to lookupsets (#126) --- resources/queries/snd/DeletedLookupSets.sql | 9 +++++++++ resources/queries/snd/DeletedLookups.sql | 9 +++++++++ resources/schemas/snd.xml | 1 + 3 files changed, 19 insertions(+) create mode 100644 resources/queries/snd/DeletedLookupSets.sql create mode 100644 resources/queries/snd/DeletedLookups.sql diff --git a/resources/queries/snd/DeletedLookupSets.sql b/resources/queries/snd/DeletedLookupSets.sql new file mode 100644 index 00000000..b6de93f9 --- /dev/null +++ b/resources/queries/snd/DeletedLookupSets.sql @@ -0,0 +1,9 @@ +select + substring(qae.oldrecordmap, charindex('objectid=',qae.oldrecordmap, 0) + len('objectid='), 36) as objectid, + qae.date as modified + +from auditLog.QueryUpdateAuditEvent as qae + +WHERE qae.comment = 'A row was deleted.' + and qae.QueryName = 'LookupSets' + and qae.SchemaName = 'snd' \ No newline at end of file diff --git a/resources/queries/snd/DeletedLookups.sql b/resources/queries/snd/DeletedLookups.sql new file mode 100644 index 00000000..b5cb96f8 --- /dev/null +++ b/resources/queries/snd/DeletedLookups.sql @@ -0,0 +1,9 @@ +select + substring(qae.oldrecordmap, charindex('objectid=',qae.oldrecordmap, 0) + len('objectid='), 36) as objectid, + qae.date as modified + +from auditLog.QueryUpdateAuditEvent as qae + +WHERE qae.comment = 'A row was deleted.' + and qae.QueryName = 'Lookups' + and qae.SchemaName = 'snd' \ No newline at end of file diff --git a/resources/schemas/snd.xml b/resources/schemas/snd.xml index a084375b..eb541229 100644 --- a/resources/schemas/snd.xml +++ b/resources/schemas/snd.xml @@ -282,6 +282,7 @@ + DETAILED