Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: migration rename columns in gas_bills table #166

Merged
merged 4 commits into from
Dec 18, 2024

Conversation

zz-hh-aa
Copy link
Collaborator

@zz-hh-aa zz-hh-aa commented Dec 11, 2024

What does this PR do?

  • Creates a new migration renaming some of the gas_bills columns
  • Updates the schema accordingly

Why?

I was starting on the data update migration and realised the shape of the gas bills data will change. It seemed like this would need to happen in two steps anyway (data change and schema change) so I figured we could rename the columns first, as the supplied CSVs are already in the next shape.

Questions

...do I need to update the tests to get everything passing even if we're just about to update the data anyway? 😅

@zz-hh-aa zz-hh-aa requested a review from a team December 11, 2024 15:51
Copy link

vercel bot commented Dec 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fairhold-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 18, 2024 11:48am

Copy link
Contributor

@DafyddLlyr DafyddLlyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once small comment!

itl String @db.VarChar
bill Float
itl1 String @db.VarChar
kwh_cost_pence Float
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also want to map this to camelCase 👍

Suggested change
kwh_cost_pence Float
kwhCostPence Float @map("kwh_cost_pence")

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still missing an @map here which would mean we can use camelCase not snake_case in getGasBillByITL3()

Copy link
Collaborator Author

@zz-hh-aa zz-hh-aa Dec 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah thanks for catching! Missed that one, should be fixed now at 28c4631

Excuse the strategy day multitasking brain carelessness 😅

itl String @db.VarChar
bill Float
itl1 String @db.VarChar
kwh_cost_pence Float
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still missing an @map here which would mean we can use camelCase not snake_case in getGasBillByITL3()

@zz-hh-aa zz-hh-aa merged commit 92006d4 into main Dec 18, 2024
5 checks passed
@zz-hh-aa zz-hh-aa deleted the oz/gas-bills-migration branch December 18, 2024 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants