Skip to content

Commit

Permalink
Merge pull request #172 from theopensystemslab/oz/prices-paid-table
Browse files Browse the repository at this point in the history
feat: rename `prices_paid` table
  • Loading branch information
zz-hh-aa authored Dec 13, 2024
2 parents 61564d5 + 38c9393 commit bc6938e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-- Alter table
ALTER TABLE "pricespaid" RENAME TO "prices_paid";

-- Alter table
ALTER TABLE "prices_paid" RENAME COLUMN "propertytype" TO "property_type";
ALTER TABLE "prices_paid" RENAME COLUMN "transactionidentifier" TO "transaction_identifier";
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "prices_paid" RENAME CONSTRAINT "pricespaid_pkey" TO "prices_paid_pkey";
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-- AlterTable
ALTER TABLE "prices_paid" ALTER COLUMN "transaction_identifier" SET NOT NULL,
ALTER COLUMN "price" SET NOT NULL,
ALTER COLUMN "postcode" SET NOT NULL,
ALTER COLUMN "property_type" SET NOT NULL,
ALTER COLUMN "newbuild" SET NOT NULL;
12 changes: 6 additions & 6 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ model ItlLookup {

model PricesPaid {
id Int @id @default(autoincrement())
transactionIdentifier String? @map("transactionidentifier") @db.VarChar(250)
price Float?
postcode String? @db.VarChar(250)
propertyType String? @map("propertytype") @db.VarChar(250)
newBuild String? @map("newbuild") @db.VarChar(250)
transactionIdentifier String @map("transaction_identifier") @db.VarChar(250)
price Float
postcode String @db.VarChar(250)
propertyType String @map("property_type") @db.VarChar(250)
newBuild String @map("newbuild") @db.VarChar(250)
@@map("pricespaid")
@@map("prices_paid")
}

model Rent {
Expand Down

0 comments on commit bc6938e

Please sign in to comment.