diff --git a/backend/lcfs/db/migrations/versions/2025-01-03-13-24_bfa7bbb1eea3.py b/backend/lcfs/db/migrations/versions/2025-01-03-13-24_bfa7bbb1eea3.py new file mode 100644 index 000000000..225cf0d87 --- /dev/null +++ b/backend/lcfs/db/migrations/versions/2025-01-03-13-24_bfa7bbb1eea3.py @@ -0,0 +1,37 @@ +"""Update fuel type name + +Revision ID: bfa7bbb1eea3 +Revises: 9329e38396e1 +Create Date: 2025-01-03 13:24:19.525006 + +""" + +import sqlalchemy as sa +from alembic import op + +# revision identifiers, used by Alembic. +revision = "bfa7bbb1eea3" +down_revision = "9329e38396e1" +branch_labels = None +depends_on = None + + +def upgrade() -> None: + # Update fuel type name + op.execute(""" + UPDATE fuel_type + SET fuel_type = 'Other diesel fuel', + provision_1_id = 3 -- Change from prescribed (1) to default (3) + WHERE fuel_type = 'Other diesel'; + """) + + +def downgrade() -> None: + # Revert fuel type name update + op.execute(""" + UPDATE fuel_type + SET fuel_type = 'Other diesel', + provision_1_id = 1 -- Change from default (3) to prescribed (1) + WHERE fuel_type = 'Other diesel fuel'; + """) + diff --git a/frontend/src/assets/locales/en/allocationAgreement.json b/frontend/src/assets/locales/en/allocationAgreement.json index f120b7ebe..554b3fbe6 100644 --- a/frontend/src/assets/locales/en/allocationAgreement.json +++ b/frontend/src/assets/locales/en/allocationAgreement.json @@ -5,7 +5,7 @@ "allocationAgreementSubtitle": "Enter allocation agreement details below", "fuelCodeFieldRequiredError": "Error updating row: Fuel code field required", "allocationAgreementColLabels": { - "transaction": "Responsibility", + "allocationTransactionType": "Responsibility", "transactionPartner": "Legal name of transaction partner", "postalAddress": "Address for service", "transactionPartnerEmail": "Email", diff --git a/frontend/src/views/AllocationAgreements/_schema.jsx b/frontend/src/views/AllocationAgreements/_schema.jsx index 26ef36700..1d275cd06 100644 --- a/frontend/src/views/AllocationAgreements/_schema.jsx +++ b/frontend/src/views/AllocationAgreements/_schema.jsx @@ -55,7 +55,7 @@ export const allocationAgreementColDefs = (optionsData, errors, currentUser) => field: 'allocationTransactionType', headerComponent: RequiredHeader, headerName: i18n.t( - 'allocationAgreement:allocationAgreementColLabels.transaction' + 'allocationAgreement:allocationAgreementColLabels.allocationTransactionType' ), cellEditor: AutocompleteCellEditor, cellEditorParams: {