Fix calendar schema defaults
This commit is contained in:
parent
a3ac05bf08
commit
4411f247ab
3 changed files with 4 additions and 4 deletions
|
|
@ -297,7 +297,7 @@ export async function POST(req: Request) {
|
||||||
hasBarbecue: Boolean(body.hasBarbecue),
|
hasBarbecue: Boolean(body.hasBarbecue),
|
||||||
evCharging: normalizeEvCharging(body.evCharging),
|
evCharging: normalizeEvCharging(body.evCharging),
|
||||||
priceHintPerNightEuros,
|
priceHintPerNightEuros,
|
||||||
calendarUrls: calendarUrls.length ? calendarUrls : null,
|
calendarUrls,
|
||||||
contactName,
|
contactName,
|
||||||
contactEmail,
|
contactEmail,
|
||||||
contactPhone: body.contactPhone ?? null,
|
contactPhone: body.contactPhone ?? null,
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
-- Add optional calendar URLs for availability sync (PostgreSQL text array)
|
-- Add calendar URLs for availability sync (PostgreSQL text array)
|
||||||
ALTER TABLE "Listing" ADD COLUMN "calendarUrls" TEXT[];
|
ALTER TABLE "Listing" ADD COLUMN "calendarUrls" TEXT[] NOT NULL DEFAULT ARRAY[]::TEXT[];
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ model Listing {
|
||||||
hasWashingMachine Boolean @default(false)
|
hasWashingMachine Boolean @default(false)
|
||||||
hasBarbecue Boolean @default(false)
|
hasBarbecue Boolean @default(false)
|
||||||
evCharging EvCharging @default(NONE)
|
evCharging EvCharging @default(NONE)
|
||||||
calendarUrls String[]? @db.Text[]
|
calendarUrls String[] @db.Text @default([])
|
||||||
priceHintPerNightEuros Int?
|
priceHintPerNightEuros Int?
|
||||||
contactName String
|
contactName String
|
||||||
contactEmail String
|
contactEmail String
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue