From 4533ee8a52eae45341554e05c4a2efbfecc097d1 Mon Sep 17 00:00:00 2001 From: Odysseus Chiu Date: Tue, 15 Aug 2023 09:46:57 -0700 Subject: [PATCH] 17243 update mhr qualified supplier product code descriptions (#2449) --- ...969323_17243_mhr_qs_product_code_update.py | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 auth-api/migrations/versions/2023_08_15_98bee9969323_17243_mhr_qs_product_code_update.py diff --git a/auth-api/migrations/versions/2023_08_15_98bee9969323_17243_mhr_qs_product_code_update.py b/auth-api/migrations/versions/2023_08_15_98bee9969323_17243_mhr_qs_product_code_update.py new file mode 100644 index 000000000..32ee396fb --- /dev/null +++ b/auth-api/migrations/versions/2023_08_15_98bee9969323_17243_mhr_qs_product_code_update.py @@ -0,0 +1,42 @@ +"""17243_mhr_qs_product_code_update + +Revision ID: 98bee9969323 +Revises: 628b52a95bad +Create Date: 2023-08-15 08:38:16.786130 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '98bee9969323' +down_revision = '628b52a95bad' +branch_labels = None +depends_on = None + + +def upgrade(): + op.execute("UPDATE public.product_codes " + "SET description='Manufactured Home Registry – Lawyers and Notaries'" + "WHERE code='MHR_QSLN'") + op.execute("UPDATE public.product_codes " + "SET description='Manufactured Home Registry – Manufacturers'" + "WHERE code='MHR_QSHM'") + op.execute("UPDATE public.product_codes " + "SET description='Manufactured Home Registry – Home Dealers'" + "WHERE code='MHR_QSHD'") + + +def downgrade(): + op.execute("UPDATE public.product_codes " + "SET description='Qualified Supplier - Lawyers and Notaries'" + "WHERE code='MHR_QSLN'") + op.execute("UPDATE public.product_codes " + "SET description='Qualified Supplier - Home Manufacturers'" + "WHERE code='MHR_QSHM'") + op.execute("UPDATE public.product_codes " + "SET description='Qualified Supplier - Home Dealers'" + "WHERE code='MHR_QSHD'") + +