diff --git a/prisma/migrations/20241212122143_rename_rent_table_columns/migration.sql b/prisma/migrations/20241212122143_rename_rent_table_columns/migration.sql new file mode 100644 index 0000000..5a250d1 --- /dev/null +++ b/prisma/migrations/20241212122143_rename_rent_table_columns/migration.sql @@ -0,0 +1,3 @@ +-- AlterTable +ALTER TABLE "rent" RENAME COLUMN "ladcode" TO "lad_code"; +ALTER TABLE "rent" RENAME COLUMN "monthlymeanrent" TO "monthly_mean_rent"; diff --git a/prisma/migrations/20241212122332_make_rent_fields_required/migration.sql b/prisma/migrations/20241212122332_make_rent_fields_required/migration.sql new file mode 100644 index 0000000..a25a632 --- /dev/null +++ b/prisma/migrations/20241212122332_make_rent_fields_required/migration.sql @@ -0,0 +1,5 @@ +-- AlterTable +ALTER TABLE "rent" ALTER COLUMN "itl3" SET NOT NULL, +ALTER COLUMN "lad_code" SET NOT NULL, +ALTER COLUMN "region" SET NOT NULL, +ALTER COLUMN "monthly_mean_rent" SET NOT NULL; diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 86e4c55..4b55772 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -61,10 +61,10 @@ model PricesPaid { model Rent { id Int @id @default(autoincrement()) - itl3 String? @db.VarChar(250) - ladCode String? @map("ladcode") @db.VarChar(250) - region String? @db.VarChar(250) - monthlyMeanRent Float? @map("monthlymeanrent") + itl3 String @db.VarChar(250) + ladCode String @map("lad_code") @db.VarChar(250) + region String @db.VarChar(250) + monthlyMeanRent Float @map("monthly_mean_rent") @@map("rent") }