
xata roll
. Xata provides comprehensive migration management with automatic rollback support, multi-version schema handling, and lock-safe operations. Track recent migration activity in the console and manage multiple schemas simultaneously. Learn more about how schema changes work.
Making Schema Changes
Xata uses pgroll behind the scenes to enable zero-downtime, reversible schema changes for PostgreSQL. This approach allows you to apply schema changes without locking tables for extended periods, ensuring your application remains available during migrations.Key Features
- Zero-downtime migrations: Apply schema changes without service interruption
- Automatic rollback: Instantly revert changes if issues arise
- Multi-version support: Serve both old and new schema versions simultaneously
- Lock-safe operations: Minimal table locking during migration execution
- Declarative approach: Express migrations declaratively rather than using raw SQL
Migration Process
- Start migration: Begin the migration process with
xata roll migrate
- Monitor progress: Check migration status and activity in the console
- Test changes: Verify application compatibility with new schema
- Complete migration: Finalize changes when ready with
xata roll complete
- Rollback if needed: Use
xata roll rollback
to revert changes instantly