@nsshunt/stsdatamanagement 1.17.104 → 1.17.106
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/db-scripts/builddb.sql +3 -3
- package/package.json +1 -1
package/db-scripts/builddb.sql
CHANGED
|
@@ -189,7 +189,7 @@ BEGIN
|
|
|
189
189
|
|
|
190
190
|
if __resoid is not null then
|
|
191
191
|
-- We have an existing resource
|
|
192
|
-
if __dbaction = 3 then
|
|
192
|
+
if __dbaction = 1 or __dbaction = 2 or __dbaction = 3 then
|
|
193
193
|
-- The existing resource is deleted, update the current version
|
|
194
194
|
update stsmonitor
|
|
195
195
|
|
|
@@ -230,7 +230,7 @@ BEGIN
|
|
|
230
230
|
latency_histogram_gauge = _latency_histogram_gauge, -- 30
|
|
231
231
|
|
|
232
232
|
validfrom = __now
|
|
233
|
-
|
|
233
|
+
dbaction = 2 -- updated
|
|
234
234
|
|
|
235
235
|
where oid = __resoid;
|
|
236
236
|
|
|
@@ -238,7 +238,7 @@ BEGIN
|
|
|
238
238
|
select * from stsresource where oid = __resoid;
|
|
239
239
|
else
|
|
240
240
|
-- The current version is in an active state, raise unique violate condition
|
|
241
|
-
RAISE 'Duplicate context within stsmonitor: %',
|
|
241
|
+
RAISE 'Duplicate context within stsmonitor: %', _context USING ERRCODE = 'unique_violation';
|
|
242
242
|
end if;
|
|
243
243
|
else
|
|
244
244
|
/*
|