Skip to content

Commit

Permalink
Updated SQL to change the ordering and upate display_order for each c…
Browse files Browse the repository at this point in the history
…urrent entry
  • Loading branch information
gregorylavery committed Jun 19, 2024
1 parent 9859c6a commit e91d209
Showing 1 changed file with 52 additions and 1 deletion.
53 changes: 52 additions & 1 deletion migrations/sql/V1.20.1__CE-742.sql
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,65 @@ values
'LESSLETHAL',
'Less lethal',
'Less lethal',
9,
50,
true,
'FLYWAY',
now (),
'FLYWAY',
now ()
);

--
-- UPDATE the display_order to allow future inserts to hwcr_outcome_code
--
UPDATE case_management.hwcr_outcome_code
SET
display_order = 10
WHERE
hwcr_outcome_code = 'DEADONARR';

UPDATE case_management.hwcr_outcome_code
SET
display_order = 20
WHERE
hwcr_outcome_code = 'DESTRYCOS';

UPDATE case_management.hwcr_outcome_code
SET
display_order = 30
WHERE
hwcr_outcome_code = 'DESTRYOTH';

UPDATE case_management.hwcr_outcome_code
SET
display_order = 40
WHERE
hwcr_outcome_code = 'GONEONARR';

UPDATE case_management.hwcr_outcome_code
SET
display_order = 60
WHERE
hwcr_outcome_code = 'REFRTOBIO';

UPDATE case_management.hwcr_outcome_code
SET
display_order = 70
WHERE
hwcr_outcome_code = 'SHRTRELOC';

UPDATE case_management.hwcr_outcome_code
SET
display_order = 80
WHERE
hwcr_outcome_code = 'TRANSLCTD';

UPDATE case_management.hwcr_outcome_code
SET
display_order = 90
WHERE
hwcr_outcome_code = 'TRANSREHB';

UPDATE case_management.configuration
SET
configuration_value = cast(configuration_value as INTEGER) + 1
Expand Down

0 comments on commit e91d209

Please sign in to comment.