bcgov / cas-ggircs

Climate Action Secretariat's Greenhouse Gas Industrial Reporting and Control System
Apache License 2.0
3 stars 4 forks source link

Remove cta_rate_units from the fuel_carbon_tax_detail table #440

Open dleard opened 2 years ago

dleard commented 2 years ago

These rate units actually belong to the data in the carbon_tax_act_fuel_type table. They have already been added there & this card is about maintaining database normalization, since we now have duplicate data between the two tables.

This will require changes to be done in the CIIP repo first before making any changes in the GGIRCS repo. CIIP's get_carbon_tax_data() function will need to derive the cta_rate_units column from the carbon_tax_act_fuel_type table instead of the fuel_carbon_tax_detail table. This will need to be deployed to prod before the change to GGIRCS or the function will break.

Once the change to CIIP has been made we can just drop the cta_rate_units column from the fuel_carbon_tax_detail table.