migration fix
This commit is contained in:
-2
@@ -4,7 +4,6 @@ UPDATE gateways
|
||||
SET ports_check = (last_probe_result::jsonb -> 'ports_check')
|
||||
WHERE last_probe_result IS NOT NULL
|
||||
AND btrim(last_probe_result) <> ''
|
||||
AND last_probe_result ~ '^[\[{]'
|
||||
AND last_probe_result::jsonb ? 'ports_check'
|
||||
AND ports_check IS NULL;
|
||||
|
||||
@@ -12,5 +11,4 @@ UPDATE gateways
|
||||
SET last_probe_result = (last_probe_result::jsonb - 'ports_check')::text
|
||||
WHERE last_probe_result IS NOT NULL
|
||||
AND btrim(last_probe_result) <> ''
|
||||
AND last_probe_result ~ '^[\[{]'
|
||||
AND last_probe_result::jsonb ? 'ports_check';
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
UPDATE gateways
|
||||
SET ports_check = (last_probe_result::jsonb -> 'ports_check')
|
||||
WHERE last_probe_result IS NOT NULL
|
||||
AND btrim(last_probe_result) <> ''
|
||||
AND last_probe_result ~ '^[\[{]'
|
||||
AND last_probe_result::jsonb ? 'ports_check'
|
||||
AND ports_check IS NULL;
|
||||
|
||||
UPDATE gateways
|
||||
SET last_probe_result = (last_probe_result::jsonb - 'ports_check')::text
|
||||
WHERE last_probe_result IS NOT NULL
|
||||
AND btrim(last_probe_result) <> ''
|
||||
AND last_probe_result ~ '^[\[{]'
|
||||
AND last_probe_result::jsonb ? 'ports_check';
|
||||
Reference in New Issue
Block a user