diff --git a/package.json b/package.json index cb18dab..7dec9d7 100644 --- a/package.json +++ b/package.json @@ -13,10 +13,11 @@ "test": "jest", "test:watch": "jest --watch", "test:coverage": "jest; open ./coverage/lcov-report/index.html", - "prisma:pull": "dotenv -e .env.local npx prisma db pull", + "prisma:pull": "dotenv -e .env.local -- npx prisma db pull", "prisma:generate": "prisma generate", - "prisma:migrate": "dotenv -e .env.local npx prisma migrate dev", - "prisma:studio": "dotenv -e .env.local npx prisma studio", + "prisma:migrate": "dotenv -e .env.local -- npx prisma migrate dev", + "prisma:migrate-create-only": "dotenv -e .env.local -- npx prisma migrate dev --create-only", + "prisma:studio": "dotenv -e .env.local -- npx prisma studio", "postinstall": "npm run prisma:generate", "prettier": "prettier --write .", "prepare": "husky", diff --git a/prisma/migrations/20241206120523_rename_buildprices/migration.sql b/prisma/migrations/20241206120523_rename_buildprices/migration.sql new file mode 100644 index 0000000..8e9baca --- /dev/null +++ b/prisma/migrations/20241206120523_rename_buildprices/migration.sql @@ -0,0 +1,3 @@ +-- AlterTable +ALTER TABLE "buildprices" +RENAME COLUMN "housetypedescription" TO "house_type_description"; diff --git a/prisma/schema.prisma b/prisma/schema.prisma index a71acab..86e4c55 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -10,7 +10,7 @@ datasource db { model BuildPrices { id Int @id @default(autoincrement()) - houseTypeDescription String? @map("housetypedescription") @db.VarChar(250) + houseTypeDescription String? @map("house_type_description") @db.VarChar(250) houseType String? @map("housetype") @db.VarChar(1) priceRange String? @map("pricerange") @db.VarChar(50) priceMid Float? @map("pricemid")