Skip to content

Migration Wizard

A guided, step-by-step wizard for migrating database schema changes between environments. The wizard streams progress in real time using Server-Sent Events (SSE).

Access

Navigate to Database > Migrate in the sidebar or go to /database/migrate.

Key Features

  • Step-by-step guided migration workflow
  • Real-time progress streaming via SSE
  • Preview generated SQL before execution
  • Rollback script generation
  • Built on results from Schema Comparison

Usage

Starting a Migration

  1. Navigate to /database/migrate
  2. Select the source connection (where changes exist)
  3. Select the target connection (where changes will be applied)
  4. Click Analyze to detect schema differences

Wizard Steps

Step 1 — Review Changes The wizard shows all detected differences between source and target schemas. Review each change and deselect any you do not want to apply.

Step 2 — Preview SQL The generated migration SQL is displayed for review. This is the exact SQL that will run against the target database.

Step 3 — Execute Click Run Migration to apply changes. Progress is streamed in real time:

  • Each statement execution is reported as it completes
  • Errors are displayed immediately with the failing statement highlighted
  • A summary shows total statements executed, succeeded, and failed

Step 4 — Summary After completion, the wizard shows the final result and provides a downloadable rollback script.

WARNING

Migrations modify the target database schema. Always back up the target database before running a migration. Use credentials with appropriate write permissions.

API

POST /api/database/migration/analyze   # Analyze differences
POST /api/database/migration/preview   # Generate SQL preview
POST /api/database/migration/execute   # Execute migration (SSE stream)

Managed by DatabaseMigrationController.

Released under the MIT License.