From 461fb3542fb4c2b7d72ce6f3e6076924f8acf0d4 Mon Sep 17 00:00:00 2001 From: zzhhaa Date: Wed, 11 Dec 2024 15:45:52 +0000 Subject: [PATCH] feat: gas_bills column rename migration --- .../20241211152923_rename_gasbills_column/migration.sql | 5 +++++ prisma/schema.prisma | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 prisma/migrations/20241211152923_rename_gasbills_column/migration.sql diff --git a/prisma/migrations/20241211152923_rename_gasbills_column/migration.sql b/prisma/migrations/20241211152923_rename_gasbills_column/migration.sql new file mode 100644 index 0000000..c585ddc --- /dev/null +++ b/prisma/migrations/20241211152923_rename_gasbills_column/migration.sql @@ -0,0 +1,5 @@ +-- AlterTable +ALTER TABLE "gas_bills" RENAME COLUMN "bill" TO "kwh_cost_pence"; +ALTER TABLE "gas_bills" RENAME COLUMN "itl" TO "itl1"; +ALTER TABLE "gas_bills" ALTER COLUMN "kwh_cost_pence" SET NOT NULL; +ALTER TABLE "gas_bills" ALTER COLUMN "itl1" SET NOT NULL; \ No newline at end of file diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 86e4c55..e3aa32a 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -91,8 +91,8 @@ model SocialRent { model GasBills { id Int @id region String @map("Region") @db.VarChar - itl String @db.VarChar - bill Float + itl1 String @db.VarChar + kwh_cost_pence Float @@map("gas_bills") }