-
-
Notifications
You must be signed in to change notification settings - Fork 608
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add internal flag to job-run table (#563)
* feat: add internal flag to job-run table * add backfill SQL * Update internal backfill to only update internal jobs --------- Co-authored-by: Eric Allam <[email protected]>
- Loading branch information
Showing
3 changed files
with
12 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
packages/database/prisma/migrations/20231005064823_add_job_run_internal/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
-- AlterTable | ||
ALTER TABLE "JobRun" ADD COLUMN "internal" BOOLEAN NOT NULL DEFAULT false; | ||
|
||
/* | ||
Backfill JobRun internal flag | ||
*/ | ||
UPDATE "JobRun" | ||
SET "internal" = "Job"."internal" | ||
FROM "Job" | ||
WHERE "JobRun"."jobId" = "Job"."id" AND "JobRun"."internal" = TRUE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters