-- CreateTable
CREATE TABLE "court_booking_logs" (
    "id" UUID NOT NULL,
    "booking_code" UUID NOT NULL,
    "court_id" UUID NOT NULL,
    "booking_date" DATE NOT NULL,
    "start_time" VARCHAR(5) NOT NULL,
    "end_time" VARCHAR(5) NOT NULL,
    "previous_status" "CourtBookingStatus" NOT NULL,
    "new_status" "CourtBookingStatus" NOT NULL,
    "changed_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,

    CONSTRAINT "court_booking_logs_pkey" PRIMARY KEY ("id")
);

-- CreateIndex
CREATE INDEX "court_booking_logs_court_id_new_status_idx" ON "court_booking_logs"("court_id", "new_status");
