migration fix

This commit is contained in:
Efstratios Giannopoulos 2024-03-11 18:32:21 +02:00
parent a399b183f6
commit c592226e77
1 changed files with 9 additions and 0 deletions

View File

@ -46,6 +46,15 @@ BEGIN
UPDATE public."DescriptionTemplate" SET version_status = 1; UPDATE public."DescriptionTemplate" SET version_status = 1;
UPDATE public."DescriptionTemplate" SET version_status = 0 where id in ( UPDATE public."DescriptionTemplate" SET version_status = 0 where id in (
select dt.id from public."DescriptionTemplate" as dt
where dt.version =
(
select Max(f.version)
from public."DescriptionTemplate" as f where f.group_id=dt.group_id and f.status = 1
)
);
UPDATE public."DescriptionTemplate" SET version_status = 2 where status = 0 id in (
select dt.id from public."DescriptionTemplate" as dt select dt.id from public."DescriptionTemplate" as dt
where dt.version = where dt.version =
( (