Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Maarch
MaarchCourrier
Commits
a6a4d9be
Commit
a6a4d9be
authored
Jul 16, 2021
by
ludo
Browse files
update migration/20.10/201017.sql
parent
eeeff88b
Changes
1
Hide whitespace changes
Inline
Side-by-side
migration/20.10/201017.sql
View file @
a6a4d9be
...
...
@@ -36,7 +36,7 @@ BEGIN
ELSE
SELECT
entity_tree
(
parentid
)
INTO
res
;
RETURN
res
;
END
IF
;
END
IF
;
END
;
$
BODY
$
LANGUAGE
plpgsql
;
...
...
@@ -55,10 +55,10 @@ BEGIN
ELSE
SELECT
(
'"'
||
lastname
||
' '
||
firstname
||
'"'
)::
JSONB
INTO
expe
FROM
users
WHERE
id
=
r
.
dest_user
;
SELECT
(
'"'
||
entity_by_res_id
(
r
.
res_id
)
||
'"'
)::
JSONB
INTO
dest
;
UPDATE
res_letterbox
SET
custom_fields
=
jsonb_set
(
custom_fields
,
'{"20"}'
,
expe
)
WHERE
res_id
=
r
.
res_id
RETURN
ing
custom_fields
INTO
res
;
UPDATE
res_letterbox
SET
custom_fields
=
jsonb_set
(
custom_fields
,
'{"18"}'
,
dest
)
WHERE
res_id
=
r
.
res_id
RETURN
ing
custom_fields
INTO
res
;
UPDATE
res_letterbox
SET
custom_fields
=
jsonb_set
(
custom_fields
,
'{"20"}'
,
expe
)
WHERE
res_id
=
r
.
res_id
RETURN
ING
custom_fields
INTO
res
;
UPDATE
res_letterbox
SET
custom_fields
=
jsonb_set
(
custom_fields
,
'{"18"}'
,
dest
)
WHERE
res_id
=
r
.
res_id
RETURN
ING
custom_fields
INTO
res
;
raise
notice
'%'
,
res
::
TEXT
;
END
IF
;
END
IF
;
END
LOOP
;
RETURN
'END'
;
END
;
...
...
@@ -66,4 +66,6 @@ $BODY$ LANGUAGE plpgsql;
SELECT
migrate_expeditor_data
();
DROP
FUNCTION
migrate_expeditor_data
;
\ No newline at end of file
DROP
FUNCTION
migrate_expeditor_data
;
UPDATE
parameters
SET
param_value_string
=
'20.10.17'
WHERE
id
=
'database_version'
;
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment