Commit 97d3f30e authored by Aleksandr Ivanov's avatar Aleksandr Ivanov

Merge branch 'master' into develop

parents a2917f5b 63e01c03
......@@ -33,7 +33,7 @@ BEGIN
(SELECT json_content -> 'data_files'
FROM riha.main_resource_view
WHERE
json_content ->> 'uuid' = updated_infosystem_uuid :: TEXT)) AS data_file
json_content ->> 'uuid' = updated_infosystem_uuid :: TEXT AND json_content #> '{data_files,0}' IS NOT NULL)) AS data_file
WHERE data_file ->> 'url' ~* 'file://[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}')
LOOP
IF exists(SELECT 1
......@@ -73,4 +73,4 @@ CREATE TRIGGER after_main_resource_insert_or_update
-- Populate registered_file table
SELECT riha.recreate_main_resource_registered_files((json_content ->> 'uuid') :: UUID)
FROM riha.main_resource_view;
\ No newline at end of file
FROM riha.main_resource_view;
......@@ -77,7 +77,7 @@ BEGIN
(SELECT json_content -> 'data_files'
FROM riha.main_resource_view
WHERE
json_content ->> 'uuid' = updated_infosystem_uuid :: TEXT)) AS data_file
json_content ->> 'uuid' = updated_infosystem_uuid :: TEXT AND json_content #> '{data_files,0}' IS NOT NULL)) AS data_file
WHERE data_file ->> 'url' ~* 'file://[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}')
LOOP
IF exists(SELECT 1
......@@ -113,4 +113,4 @@ ON riha.main_resource;
CREATE TRIGGER after_main_resource_insert_or_update
AFTER INSERT OR UPDATE
ON riha.main_resource
FOR EACH ROW EXECUTE PROCEDURE riha.on_after_main_resource_insert_or_update();
\ No newline at end of file
FOR EACH ROW EXECUTE PROCEDURE riha.on_after_main_resource_insert_or_update();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment