Docs/Commands/repair
OSSgenerated from cli/_parser_setup.py

dblift repair

Bring the schema history table back in line with the scripts on disk. Repair rewrites history rows only. It never runs migration SQL and never touches your tables.

Synopsis

$ dblift repair [--strict] [--table TABLE]

Options

FlagDescription
--tableCustom schema history table name (default: dblift_schema_history)
--strictEnable strict mode - fail if any previously applied migration is missing and require migrations to be applied in strict version order

Global flags apply to every command: --config, --env, --scripts, --dry-run, --quiet, --log-level. See global flags.

Examples

See the repairs before committing to them

$ dblift repair --dry-run

Clear a failed migration so it can be retried

$ dblift repair

Exit codes

CodeMeaning
0Command completed successfully
4A paid-edition feature was invoked without a valid licence (EXIT_LICENSE_REQUIRED)
On this page