The pgroll binary version is pinned by the CLI and can be overridden with the
XATA_PGROLL_BINARY_VERSION environment variable.-h, --help.
xata roll baseline— Create a baseline migration for an existing database schemaxata roll complete— Complete an ongoing migration with the operations present in the given filexata roll init— Initialize pgroll in the target databasexata roll latest— Print the name of the latest schema version or migrationxata roll latest migration— Print the latest migration namexata roll latest schema— Print the latest version schema name
xata roll migrate— Apply outstanding migrations from a directory to a databasexata roll update— Update outdated migrations in a directoryxata roll pull— Pull migration history from the target database and write it to diskxata roll rollback— Roll back an ongoing migrationxata roll start— Start a migration for the operations present in the given filexata roll status— Show pgroll statusxata roll convert— Convert SQL statements to a pgroll migration
baseline
Create a baseline migration for an existing database schemastring
Postgres lock timeout in milliseconds for pgroll DDL operations
string
Postgres schema to use for pgroll internal state
string
Postgres URL
string
Optional postgres role to set when executing migrations
string
Postgres schema to use for the migration
string
Create version schemas for each migration
string
Enable verbose logging
string
Output in JSON format instead of YAML
string
Skip confirmation prompt
string
The profile to use
string
Version name for the baseline, for example 01_initial_schema
string
The directory that contains the migrations
complete
Complete an ongoing migration with the operations present in the given filestring
Postgres lock timeout in milliseconds for pgroll DDL operations
string
Postgres schema to use for pgroll internal state
string
Postgres URL
string
Optional postgres role to set when executing migrations
string
Postgres schema to use for the migration
string
Create version schemas for each migration
string
Enable verbose logging
string
The profile to use
init
Initialize pgroll in the target databasestring
Postgres lock timeout in milliseconds for pgroll DDL operations
string
Postgres schema to use for pgroll internal state
string
Postgres URL
string
Optional postgres role to set when executing migrations
string
Postgres schema to use for the migration
string
Create version schemas for each migration
string
Enable verbose logging
string
The profile to use
latest
Print the name of the latest schema version or migrationlatest migration
Print the latest migration namestring
Postgres lock timeout in milliseconds for pgroll DDL operations
string
Postgres schema to use for pgroll internal state
string
Postgres URL
string
Optional postgres role to set when executing migrations
string
Postgres schema to use for the migration
string
Create version schemas for each migration
string
Enable verbose logging
string
Retrieve the latest migration from a local migration directory
string
The profile to use
latest schema
Print the latest version schema namestring
Postgres lock timeout in milliseconds for pgroll DDL operations
string
Postgres schema to use for pgroll internal state
string
Postgres URL
string
Optional postgres role to set when executing migrations
string
Postgres schema to use for the migration
string
Create version schemas for each migration
string
Enable verbose logging
string
Retrieve the latest version from a local migration directory
string
The profile to use
migrate
Apply outstanding migrations from a directory to a databasestring
Postgres lock timeout in milliseconds for pgroll DDL operations
string
Postgres schema to use for pgroll internal state
string
Postgres URL
string
Optional postgres role to set when executing migrations
string
Postgres schema to use for the migration
string
Create version schemas for each migration
string
Enable verbose logging
string
Duration of delay between batch backfills (eg. 1s, 1000ms)
string
Number of rows backfilled in each batch
string
Complete the final migration rather than leaving it active
string
Abort if there is more than one migration to be applied
string
The profile to use
string
The directory that contains the migrations
update
Update outdated migrations in a directorystring
Postgres lock timeout in milliseconds for pgroll DDL operations
string
Postgres schema to use for pgroll internal state
string
Postgres URL
string
Optional postgres role to set when executing migrations
string
Postgres schema to use for the migration
string
Create version schemas for each migration
string
Enable verbose logging
string
Output migration file in JSON format instead of YAML
string
The profile to use
string
The directory that contains the migrations
pull
Pull migration history from the target database and write it to diskstring
Postgres lock timeout in milliseconds for pgroll DDL operations
string
Postgres schema to use for pgroll internal state
string
Postgres URL
string
Optional postgres role to set when executing migrations
string
Postgres schema to use for the migration
string
Create version schemas for each migration
string
Enable verbose logging
string
Output each migration in JSON format instead of YAML
string
The profile to use
string
The target directory to pull migrations into
rollback
Roll back an ongoing migrationstring
Postgres lock timeout in milliseconds for pgroll DDL operations
string
Postgres schema to use for pgroll internal state
string
Postgres URL
string
Optional postgres role to set when executing migrations
string
Postgres schema to use for the migration
string
Create version schemas for each migration
string
Enable verbose logging
string
The profile to use
start
Start a migration for the operations present in the given filestring
Postgres lock timeout in milliseconds for pgroll DDL operations
string
Postgres schema to use for pgroll internal state
string
Postgres URL
string
Optional postgres role to set when executing migrations
string
Postgres schema to use for the migration
string
Create version schemas for each migration
string
Enable verbose logging
string
Duration of delay between batch backfills (eg. 1s, 1000ms)
string
Number of rows backfilled in each batch
string
Mark the migration as complete
string
Skip migration validation
string
The profile to use
string
required
The migration file to start
status
Show pgroll statusstring
Postgres lock timeout in milliseconds for pgroll DDL operations
string
Postgres schema to use for pgroll internal state
string
Postgres URL
string
Optional postgres role to set when executing migrations
string
Postgres schema to use for the migration
string
Create version schemas for each migration
string
Enable verbose logging
string
The profile to use
convert
Convert SQL statements to a pgroll migrationstring
Postgres lock timeout in milliseconds for pgroll DDL operations
string
Postgres schema to use for pgroll internal state
string
Postgres URL
string
Optional postgres role to set when executing migrations
string
Postgres schema to use for the migration
string
Create version schemas for each migration
string
Enable verbose logging
string
Output migration file in JSON format instead of YAML
string
The profile to use
string
required
The migration file to convert