Initial commit: Cat Sitting Planner with PWA, SQLite, and Webhook Notifications
This commit is contained in:
23
prisma/migrations/20260112190948_init/migration.sql
Normal file
23
prisma/migrations/20260112190948_init/migration.sql
Normal file
@@ -0,0 +1,23 @@
|
||||
-- CreateTable
|
||||
CREATE TABLE "Plan" (
|
||||
"id" TEXT NOT NULL PRIMARY KEY,
|
||||
"password" TEXT NOT NULL,
|
||||
"startDate" DATETIME NOT NULL,
|
||||
"endDate" DATETIME NOT NULL,
|
||||
"instructions" TEXT,
|
||||
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "Booking" (
|
||||
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||
"planId" TEXT NOT NULL,
|
||||
"date" DATETIME NOT NULL,
|
||||
"sitterName" TEXT,
|
||||
"type" TEXT NOT NULL DEFAULT 'SITTER',
|
||||
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
CONSTRAINT "Booking_planId_fkey" FOREIGN KEY ("planId") REFERENCES "Plan" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "Booking_planId_date_sitterName_key" ON "Booking"("planId", "date", "sitterName");
|
||||
Reference in New Issue
Block a user