feat: implement flexible feeding intervals and fix layout alignment
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
-- RedefineTables
|
||||
PRAGMA defer_foreign_keys=ON;
|
||||
PRAGMA foreign_keys=OFF;
|
||||
CREATE TABLE "new_Plan" (
|
||||
"id" TEXT NOT NULL PRIMARY KEY,
|
||||
"title" TEXT NOT NULL,
|
||||
"password" TEXT NOT NULL,
|
||||
"startDate" DATETIME NOT NULL,
|
||||
"endDate" DATETIME NOT NULL,
|
||||
"instructions" TEXT,
|
||||
"webhookUrl" TEXT,
|
||||
"notifyAll" BOOLEAN NOT NULL DEFAULT true,
|
||||
"feedingPerDay" INTEGER NOT NULL DEFAULT 2,
|
||||
"litterInterval" INTEGER NOT NULL DEFAULT 2,
|
||||
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
INSERT INTO "new_Plan" ("createdAt", "endDate", "id", "instructions", "notifyAll", "password", "startDate", "title", "webhookUrl") SELECT "createdAt", "endDate", "id", "instructions", "notifyAll", "password", "startDate", "title", "webhookUrl" FROM "Plan";
|
||||
DROP TABLE "Plan";
|
||||
ALTER TABLE "new_Plan" RENAME TO "Plan";
|
||||
PRAGMA foreign_keys=ON;
|
||||
PRAGMA defer_foreign_keys=OFF;
|
||||
@@ -0,0 +1,22 @@
|
||||
-- RedefineTables
|
||||
PRAGMA defer_foreign_keys=ON;
|
||||
PRAGMA foreign_keys=OFF;
|
||||
CREATE TABLE "new_Plan" (
|
||||
"id" TEXT NOT NULL PRIMARY KEY,
|
||||
"title" TEXT NOT NULL,
|
||||
"password" TEXT NOT NULL,
|
||||
"startDate" DATETIME NOT NULL,
|
||||
"endDate" DATETIME NOT NULL,
|
||||
"instructions" TEXT,
|
||||
"webhookUrl" TEXT,
|
||||
"notifyAll" BOOLEAN NOT NULL DEFAULT true,
|
||||
"feedingPerDay" INTEGER NOT NULL DEFAULT 2,
|
||||
"feedingInterval" INTEGER NOT NULL DEFAULT 1,
|
||||
"litterInterval" INTEGER NOT NULL DEFAULT 2,
|
||||
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
INSERT INTO "new_Plan" ("createdAt", "endDate", "feedingPerDay", "id", "instructions", "litterInterval", "notifyAll", "password", "startDate", "title", "webhookUrl") SELECT "createdAt", "endDate", "feedingPerDay", "id", "instructions", "litterInterval", "notifyAll", "password", "startDate", "title", "webhookUrl" FROM "Plan";
|
||||
DROP TABLE "Plan";
|
||||
ALTER TABLE "new_Plan" RENAME TO "Plan";
|
||||
PRAGMA foreign_keys=ON;
|
||||
PRAGMA defer_foreign_keys=OFF;
|
||||
@@ -16,6 +16,9 @@ model Plan {
|
||||
instructions String?
|
||||
webhookUrl String?
|
||||
notifyAll Boolean @default(true)
|
||||
feedingPerDay Int @default(2)
|
||||
feedingInterval Int @default(1)
|
||||
litterInterval Int @default(2)
|
||||
createdAt DateTime @default(now())
|
||||
bookings Booking[]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user