-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once small comment!
prisma/schema.prisma
Outdated
itl String @db.VarChar | ||
bill Float | ||
itl1 String @db.VarChar | ||
kwh_cost_pence Float |
There was a problem hiding this comment.
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 👍
kwh_cost_pence Float | |
kwhCostPence Float @map("kwh_cost_pence") |
There was a problem hiding this comment.
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()
There was a problem hiding this comment.
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 😅
4388f28
to
48cddce
Compare
prisma/schema.prisma
Outdated
itl String @db.VarChar | ||
bill Float | ||
itl1 String @db.VarChar | ||
kwh_cost_pence Float |
There was a problem hiding this comment.
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()
07d2f98
to
f9f04e7
Compare
f9f04e7
to
28c4631
Compare
What does this PR do?
gas_bills
columnsWhy?
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? 😅