Files
kooltab-backoffice/apps/api/prisma/migrations/20261028120000_free_drinks_customer/migration.sql
T
brammie15 ca3af671cf
CI / build-and-test (push) Canceled after 0s
feat: add better tab view
2026-10-28 00:37:16 +01:00

6 lines
370 B
SQL

-- Every venue gets a "Free Drinks" customer; the next sync opens its tab (or keeps one that is already open)
INSERT INTO "PlannedTab" ("id", "venueId", "customerName", "customerNameKey", "position", "createdAt")
SELECT gen_random_uuid()::text, "id", 'Free Drinks', 'free drinks', 0, CURRENT_TIMESTAMP
FROM "Venue"
ON CONFLICT ("venueId", "customerNameKey") DO NOTHING;