From 1638d831db77ee258b62ccf2e016ff089e64d7a4 Mon Sep 17 00:00:00 2001 From: gregorylavery <100631366+gregorylavery@users.noreply.github.com> Date: Fri, 15 Nov 2024 09:42:36 -0800 Subject: [PATCH 1/2] Creation of new script. --- migrations/sql/V1.32.0__CE-895.sql | 52 ++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 migrations/sql/V1.32.0__CE-895.sql diff --git a/migrations/sql/V1.32.0__CE-895.sql b/migrations/sql/V1.32.0__CE-895.sql new file mode 100644 index 00000000..b673ec4b --- /dev/null +++ b/migrations/sql/V1.32.0__CE-895.sql @@ -0,0 +1,52 @@ +-- +-- INSERT INTO hwcr_outcome_code +-- +insert into + hwcr_outcome_code ( + hwcr_outcome_code, + short_description, + long_description, + display_order, + active_ind, + create_user_id, + create_utc_timestamp, + update_user_id, + update_utc_timestamp + ) +values + ( + 'EUTHCOS', + 'Euthanized by COS', + 'Euthanized by COS', + 15, + true, + 'FLYWAY', + now (), + 'FLYWAY', + now () + ), + ( + 'EUTHOTH', + 'Euthanized by Other', + 'Euthanized by Other', + 25, + true, + 'FLYWAY', + now (), + 'FLYWAY', + now () + ); + +update case_management.hwcr_outcome_code +set + short_description = 'Dispatched by COS', + long_description = 'Dispatched by COS' +where + hwcr_outcome_code = 'DESTRYCOS'; + +update case_management.hwcr_outcome_code +set + short_description = 'Dispatched by Other', + long_description = 'Dispatched by Other' +where + hwcr_outcome_code = 'DESTRYOTH'; \ No newline at end of file From 57be9e12af186578bbfa5f1b412728616b0bda8e Mon Sep 17 00:00:00 2001 From: gregorylavery <100631366+gregorylavery@users.noreply.github.com> Date: Fri, 22 Nov 2024 08:38:11 -0800 Subject: [PATCH 2/2] Moved updates to R script and deleted the V script. --- migrations/sql/R__code-table-data.sql.sql | 53 +++++++++++++++++++++++ migrations/sql/V1.32.0__CE-895.sql | 52 ---------------------- 2 files changed, 53 insertions(+), 52 deletions(-) delete mode 100644 migrations/sql/V1.32.0__CE-895.sql diff --git a/migrations/sql/R__code-table-data.sql.sql b/migrations/sql/R__code-table-data.sql.sql index a645c241..427cd5c3 100644 --- a/migrations/sql/R__code-table-data.sql.sql +++ b/migrations/sql/R__code-table-data.sql.sql @@ -5411,6 +5411,59 @@ SET WHERE drug_remaining_outcome_code = 'RDIS'; +-- +-- INSERT INTO hwcr_outcome_code +-- +insert into + hwcr_outcome_code ( + hwcr_outcome_code, + short_description, + long_description, + display_order, + active_ind, + create_user_id, + create_utc_timestamp, + update_user_id, + update_utc_timestamp + ) +values + ( + 'EUTHCOS', + 'Euthanized by COS', + 'Euthanized by COS', + 15, + true, + 'FLYWAY', + now (), + 'FLYWAY', + now () + ), + ( + 'EUTHOTH', + 'Euthanized by Other', + 'Euthanized by Other', + 25, + true, + 'FLYWAY', + now (), + 'FLYWAY', + now () + ) on conflict do nothing; + +update case_management.hwcr_outcome_code +set + short_description = 'Dispatched by COS', + long_description = 'Dispatched by COS' +where + hwcr_outcome_code = 'DESTRYCOS'; + +update case_management.hwcr_outcome_code +set + short_description = 'Dispatched by Other', + long_description = 'Dispatched by Other' +where + hwcr_outcome_code = 'DESTRYOTH'; + -------------------------- -- New Changes above this line ------------------------- diff --git a/migrations/sql/V1.32.0__CE-895.sql b/migrations/sql/V1.32.0__CE-895.sql deleted file mode 100644 index b673ec4b..00000000 --- a/migrations/sql/V1.32.0__CE-895.sql +++ /dev/null @@ -1,52 +0,0 @@ --- --- INSERT INTO hwcr_outcome_code --- -insert into - hwcr_outcome_code ( - hwcr_outcome_code, - short_description, - long_description, - display_order, - active_ind, - create_user_id, - create_utc_timestamp, - update_user_id, - update_utc_timestamp - ) -values - ( - 'EUTHCOS', - 'Euthanized by COS', - 'Euthanized by COS', - 15, - true, - 'FLYWAY', - now (), - 'FLYWAY', - now () - ), - ( - 'EUTHOTH', - 'Euthanized by Other', - 'Euthanized by Other', - 25, - true, - 'FLYWAY', - now (), - 'FLYWAY', - now () - ); - -update case_management.hwcr_outcome_code -set - short_description = 'Dispatched by COS', - long_description = 'Dispatched by COS' -where - hwcr_outcome_code = 'DESTRYCOS'; - -update case_management.hwcr_outcome_code -set - short_description = 'Dispatched by Other', - long_description = 'Dispatched by Other' -where - hwcr_outcome_code = 'DESTRYOTH'; \ No newline at end of file