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),
|
||||
evCharging: normalizeEvCharging(body.evCharging),
|
||||
priceHintPerNightEuros,
|
||||
calendarUrls: calendarUrls.length ? calendarUrls : null,
|
||||
calendarUrls,
|
||||
contactName,
|
||||
contactEmail,
|
||||
contactPhone: body.contactPhone ?? null,
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
-- Add optional calendar URLs for availability sync (PostgreSQL text array)
|
||||
ALTER TABLE "Listing" ADD COLUMN "calendarUrls" TEXT[];
|
||||
-- Add calendar URLs for availability sync (PostgreSQL text array)
|
||||
ALTER TABLE "Listing" ADD COLUMN "calendarUrls" TEXT[] NOT NULL DEFAULT ARRAY[]::TEXT[];
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ model Listing {
|
|||
hasWashingMachine Boolean @default(false)
|
||||
hasBarbecue Boolean @default(false)
|
||||
evCharging EvCharging @default(NONE)
|
||||
calendarUrls String[]? @db.Text[]
|
||||
calendarUrls String[] @db.Text @default([])
|
||||
priceHintPerNightEuros Int?
|
||||
contactName String
|
||||
contactEmail String
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue