Docs/Commands/info
OSSgenerated from cli/_parser_setup.py
dblift info
Show migration information. Reads the schema history table, resolves it against the scripts on disk, and prints one row per migration with the state DBLift has assigned it.
Synopsis
$ dblift info [--format {table,json}]
[--tags TAGS] [--exclude-tags TAGS]
[--versions LIST] [--exclude-versions LIST]
[--placeholders K=V [K=V ...]]
[--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--tagsExecute migrations with specified tags (comma-separated list)--exclude-tagsSkip migrations with specified tags (comma-separated list)--versionsExecute only specific versions (comma-separated list)--exclude-versionsSkip specific versions (comma-separated list)--placeholdersSQL placeholders for variable substitution in migration scripts. Format: key1=value1,key2=value2 or key1=value1 key2=value2. Can be repeated: --placeholders k1=v1 --placeholders k2=v2--db-urlDatabase URL--db-usernameDatabase username--db-passwordDatabase password--db-schemaDatabase schema--target-versionLabel scripts above this version as Above target--formatOutput format (default: table)Global flags apply to every command: --config, --env, --scripts, --dry-run, --quiet, --log-level. See global flags.
Examples
Check state before a release
$ dblift info┏━━━━━━━━━━━━━━━━━━━━━━━ DBLIFT DATABASE MIGRATION LOG ━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Timestamp: 2026-01-15 12:00:00 ┃ ┃ Dblift version: 3.9.0 ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ DBLIFT COMMAND: INFO ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Connected to database ./app.db (SQLite) ┃ ┃ Database: ./app.db ┃ ┃ Schema: main ┃ ┃ Schema Version: 1.0.0 ┃ ┃ Database URL: sqlite:///./app.db ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ === Migration Summary === Total Migrations: 1 Applied Migrations: 1 Pending Migrations: 0 Failed Migrations: 0 ========================= ╭────────────┬─────────┬──────────────┬──────┬─────────────────────┬──────────────┬─────────┬───────────┬──────────╮ │ Category │ Version │ Description │ Type │ Installed On │ Installed By │ State │ Exec Time │ Undoable │ ├────────────┼─────────┼──────────────┼──────┼─────────────────────┼──────────────┼─────────┼───────────┼──────────┤ │ Versioned │ 1.0.0 │ create_users │ SQL │ 2026-01-15 12:00:00 │ you │ Success │ 1ms │ Yes │ ╰────────────┴─────────┴──────────────┴──────┴─────────────────────┴──────────────┴─────────┴───────────┴──────────╯ Total migrations: 1 ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ SUCCESS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Command INFO completed successfully (Execution time: 12 ms) ┃ ┃ Schema Version: 1.0.0 ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
Machine-readable output for a CI gate
$ dblift info --format json┏━━━━━━━━━━━━━━━━━━━━━━━ DBLIFT DATABASE MIGRATION LOG ━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Timestamp: 2026-01-15 12:00:00 ┃
┃ Dblift version: 3.9.0 ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
{
"success": true,
"current_schema_version": "1.0.0",
"target_schema": "main",
"db_version": "SQLite 3.45.1",
"database_url_masked": "sqlite:///./app.db",
"native_driver": "sqlite3",
"migrations": [
{
"script": "V1_0_0__create_users[core].sql",
"version": "1.0.0",
"description": "create_users",
"type": "SQL",
"status": "SUCCESS",
"checksum": 1083525655,
"installed_on": "2026-01-15 12:00:00",
"installed_by": "you",
"execution_time": 1,
"error": null
}
]
}
Show only migrations tagged auth
$ dblift info --tags=auth┏━━━━━━━━━━━━━━━━━━━━━━━ DBLIFT DATABASE MIGRATION LOG ━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Timestamp: 2026-01-15 12:00:00 ┃ ┃ Dblift version: 3.9.0 ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ DBLIFT COMMAND: INFO ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Connected to database ./app.db (SQLite) ┃ ┃ Database: ./app.db ┃ ┃ Schema: main ┃ ┃ Schema Version: 1.0.0 ┃ ┃ Database URL: sqlite:///./app.db ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ === Migration Summary === Total Migrations: 1 Applied Migrations: 0 Pending Migrations: 1 Failed Migrations: 0 ========================= ╭────────────┬─────────┬─────────────┬──────┬─────────────────────┬──────────────┬─────────┬───────────┬──────────╮ │ Category │ Version │ Description │ Type │ Installed On │ Installed By │ State │ Exec Time │ Undoable │ ├────────────┼─────────┼─────────────┼──────┼─────────────────────┼──────────────┼─────────┼───────────┼──────────┤ │ Versioned │ 1.2.0 │ add_note │ SQL │ │ │ Pending │ │ Yes │ ╰────────────┴─────────┴─────────────┴──────┴─────────────────────┴──────────────┴─────────┴───────────┴──────────╯ Total migrations: 1 ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ SUCCESS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Command INFO completed successfully (Execution time: 12 ms) ┃ ┃ Schema Version: 1.0.0 ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
Exit codes
CodeMeaning
0Command completed successfully4A paid-edition feature was invoked without a valid licence (EXIT_LICENSE_REQUIRED)