Redgate Flyway

Commands

Flyway provides a comprehensive set of commands to manage database migrations and schema evolution.

Project Setup & Management

Commands for initializing and setting up Flyway projects

Command Tier Description
Init Community Initializes a new Flyway project with default configuration and folder structure
Auth Teams Initiates license acquisition flow for Flyway Teams and Enterprise editions

Migration Management

Core commands for applying and managing database migrations

Command Tier Description
Add Community Creates new empty migration scripts following your project's naming conventions
Info Community Shows detailed status about the target and information about all migrations, including what's been applied and what's pending
Validate Community Checks for differences between the available migrations and the migrations applied to the target
Repair Community Repairs the schema history table by removing failed migrations and realigning checksums
Baseline Community Baselines an existing database by marking it as migrated up to a specific version

Database Development & Comparison

Commands for developing and comparing databases

Command Tier Description
Check Changes Enterprise Analyzes changes between migrations and the database
Check Code Community Performs code analysis on migrations
Diff Enterprise Compares a source with a target to identify differences
Diff Text Enterprise Outputs the object definitions from a differences artifact generated by the diff command
Generate Enterprise Generates migration scripts automatically based on schema differences from diff operations
Model Enterprise Creates or updates a schema model

Deployment

Commands for deploying changes to a database

Command Tier Description
Migrate Community Executes pending migrations against target environment
Undo Teams Rolls back the most recently applied versioned migration
Check Drift Enterprise Detects schema drift between the database and migrations
Check DryRun Teams Performs a dry run of migrations to preview changes
Prepare Enterprise Generates a deployment script from a comparison source
Deploy Enterprise Executes deployment scripts against target databases
Snapshot Enterprise Takes snapshots of database state for comparison

Utilities

Command Tier Description
List Engines Community Lists all available database engines and their versions
Clean Community Development only - Drops all objects in configured schemas - never use on production!

Didn't find what you were looking for?