From 46bd552179ebe8229ad66864be7b12e989c75285 Mon Sep 17 00:00:00 2001 From: zzhhaa Date: Thu, 12 Dec 2024 11:32:29 +0000 Subject: [PATCH] feat: make social_rent_earnings fields required --- .../migration.sql | 5 +++++ prisma/schema.prisma | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 prisma/migrations/20241212113106_make_social_rent_earnings_fields_required/migration.sql diff --git a/prisma/migrations/20241212113106_make_social_rent_earnings_fields_required/migration.sql b/prisma/migrations/20241212113106_make_social_rent_earnings_fields_required/migration.sql new file mode 100644 index 00000000..6089b7de --- /dev/null +++ b/prisma/migrations/20241212113106_make_social_rent_earnings_fields_required/migration.sql @@ -0,0 +1,5 @@ + +-- AlterTable +ALTER TABLE "social_rent_earnings" ALTER COLUMN "county" SET NOT NULL, +ALTER COLUMN "itl3" SET NOT NULL, +ALTER COLUMN "earnings_per_week" SET NOT NULL; diff --git a/prisma/schema.prisma b/prisma/schema.prisma index b09b42c6..5612bd38 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -81,9 +81,9 @@ model SocialRentAdjustments { model SocialRentEarnings { id Int @id @default(autoincrement()) - county String? @db.VarChar(250) - itl3 String? @db.VarChar(250) - earningsPerWeek Float? @map("earnings_per_week") + county String @db.VarChar(250) + itl3 String @db.VarChar(250) + earningsPerWeek Float @map("earnings_per_week") @@map("social_rent_earnings") }