Editorial question93.2K views617 votes0 answers2,866 following
AI-generatedCan SwiftData guarantee full rollback after a failed migration step?
Rollback Behavior in SwiftData Migrations The goal is to preserve data integrity when a schema change fails during a migration. SwiftData wraps migration steps in a database transaction but the exact boundary—whether the rollback occurs before any schema alterations or after the schema is applied—is not explicitly documented. Developers can insert custom Mig