From e1d74ff63d70542bb62fd8aa27f05a2373507a33 Mon Sep 17 00:00:00 2001 From: HotelSync Date: Wed, 8 Apr 2026 02:28:17 +0300 Subject: [PATCH] fix: add 'website' to bookings source check constraint Widget bookings use source='website' which violated the existing constraint. Migration 069 expands the constraint to include 'website'. Co-Authored-By: Claude Sonnet 4.6 --- backend/migrations/069_bookings_source_website.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 backend/migrations/069_bookings_source_website.sql diff --git a/backend/migrations/069_bookings_source_website.sql b/backend/migrations/069_bookings_source_website.sql new file mode 100644 index 0000000..ea3c6ea --- /dev/null +++ b/backend/migrations/069_bookings_source_website.sql @@ -0,0 +1,6 @@ +-- Migration 069 — Add 'website' to allowed booking sources + +ALTER TABLE bookings DROP CONSTRAINT IF EXISTS bookings_source_check; + +ALTER TABLE bookings ADD CONSTRAINT bookings_source_check + CHECK (source IN ('direct','booking_com','airbnb','expedia','vrbo','website','other'));