Skip to content

Commit

Permalink
migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
Cufee committed Jun 7, 2024
1 parent 1f7356f commit 6583ccb
Showing 1 changed file with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
-- CreateTable
CREATE TABLE "cron_tasks" (
"id" TEXT NOT NULL PRIMARY KEY,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
"type" TEXT NOT NULL,
"referenceId" TEXT NOT NULL,
"targetsEncoded" TEXT NOT NULL,
"status" TEXT NOT NULL,
"lastRun" DATETIME NOT NULL,
"scheduledAfter" DATETIME NOT NULL,
"logsEncoded" TEXT NOT NULL DEFAULT '',
"dataEncoded" TEXT NOT NULL DEFAULT ''
);

-- CreateIndex
CREATE INDEX "cron_tasks_referenceId_idx" ON "cron_tasks"("referenceId");

-- CreateIndex
CREATE INDEX "cron_tasks_status_referenceId_scheduledAfter_idx" ON "cron_tasks"("status", "referenceId", "scheduledAfter");

-- CreateIndex
CREATE INDEX "cron_tasks_lastRun_status_idx" ON "cron_tasks"("lastRun", "status");

0 comments on commit 6583ccb

Please sign in to comment.