mirror of
https://github.com/hanzoai/calendar.git
synced 2026-10-30 14:46:43 +00:00
* fix: Prevent duplicate bookings with idempotency key * Add idempotencyKey to builder.ts type fix * Add tests for new idempotency key (booking create) * Add endTime to idempotency key, it should be possible to book different durations * Move reschedule before the create so the idempotency key is unset
12 lines
349 B
SQL
12 lines
349 B
SQL
/*
|
|
Warnings:
|
|
|
|
- A unique constraint covering the columns `[idempotencyKey]` on the table `Booking` will be added. If there are existing duplicate values, this will fail.
|
|
|
|
*/
|
|
-- AlterTable
|
|
ALTER TABLE "Booking" ADD COLUMN "idempotencyKey" TEXT;
|
|
|
|
-- CreateIndex
|
|
CREATE UNIQUE INDEX "Booking_idempotencyKey_key" ON "Booking"("idempotencyKey");
|