Skip to content

Commit ba0f148

Browse files
committed
refactor(migration): ensure 'triggerJobCompleted' column is added only if it does not exist
- Updated the SQL migration to include the 'IF NOT EXISTS' clause when adding the 'triggerJobCompleted' column to the Onboarding table. - This change prevents errors during migration if the column already exists, enhancing the robustness of the migration process.
1 parent 4c7be5b commit ba0f148

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • packages/db/prisma/migrations/20250627180828_rename_completed_col

packages/db/prisma/migrations/20250627180828_rename_completed_col/migration.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
-- AlterTable
88
ALTER TABLE "Onboarding"
9-
ADD COLUMN "triggerJobCompleted" BOOLEAN NOT NULL DEFAULT false;
9+
ADD COLUMN IF NOT EXISTS "triggerJobCompleted" BOOLEAN NOT NULL DEFAULT false;
1010

1111
-- Copy existing values from completed to triggerJobCompleted
1212
UPDATE "Onboarding" SET "triggerJobCompleted" = "completed";

0 commit comments

Comments
 (0)