BulkActionGroup changed some columns around

This commit is contained in:
Matt Aitken
2025-06-23 15:14:11 +01:00
parent ab462020b2
commit 00ff1b21dc
2 changed files with 32 additions and 8 deletions
@@ -0,0 +1,18 @@
/*
Warnings:
- You are about to drop the column `processedCount` on the `BulkActionGroup` table. All the data in the column will be lost.
- You are about to drop the column `reason` on the `BulkActionGroup` table. All the data in the column will be lost.
*/
-- AlterEnum
ALTER TYPE "BulkActionStatus" ADD VALUE 'ABORTED';
-- AlterTable
ALTER TABLE "BulkActionGroup"
DROP COLUMN "processedCount",
DROP COLUMN "reason",
ADD COLUMN "completedAt" TIMESTAMP(3),
ADD COLUMN "failureCount" INTEGER NOT NULL DEFAULT 0,
ADD COLUMN "name" TEXT,
ADD COLUMN "successCount" INTEGER NOT NULL DEFAULT 0;
@@ -1928,22 +1928,27 @@ model BulkActionGroup {
status BulkActionStatus @default(PENDING)
/// The query that will be executed to get the runs to process (if null, we are passing run ids directly)
queryName String?
queryName String?
/// The params that will be passed to the query
params Json?
params Json?
/// The cursor that will be passed to the query (null for the first page)
cursor Json?
/// The number of runs that have been processed
processedCount Int @default(0)
cursor Json?
/// The number of runs that have been processed successfully
successCount Int @default(0)
/// The number of runs that have been failed
failureCount Int @default(0)
/// The total number of runs that will be processed
totalCount Int @default(0)
totalCount Int @default(0)
/// The userId who did the bulk action
user User? @relation(fields: [userId], references: [id], onDelete: SetNull, onUpdate: Cascade)
userId String?
/// Why the user did the bulk action
reason String?
/// The name of the bulk action
name String?
/// The time the bulk action was completed
completedAt DateTime?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@ -1961,6 +1966,7 @@ enum BulkActionType {
enum BulkActionStatus {
PENDING
COMPLETED
ABORTED
}
model BulkActionItem {