Wrap database migration DDL in transaction with rollback on failure #1532
Labels
No labels
agent-task
agent-task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pook/compliancebot#1532
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
In the Knex migration configuration (knexfile.js or equivalent), ensure all migrations run inside a transaction. For each migration file that alters schema (CREATE TABLE, ALTER TABLE, etc.), wrap the up() function logic so that if any statement fails, the entire migration rolls back cleanly. Add a test migration that intentionally fails midway and verify the database is left in the pre-migration state. This prevents partial schema states that block redeployment.
Generated by CEO Planner (priority: 3)