db:status

Show the current migration status for all tracked features.


Usage

splent db:status

Description

Compares the splent_migrations table (applied revisions) against the migration files on disk (latest revisions) for all declared features and any features still tracked in the database.

Example output

πŸ“Š Migration Status

  Feature                       Applied         Latest          Status
  ----------------------------  --------------  --------------  ------------
  splent_feature_admin          β€”               β€”               β€” none
  splent_feature_auth           990210b54b52    990210b54b52    βœ” synced
  splent_feature_confirmemail   126da35a357f    126da35a357f    βœ” synced
  splent_feature_notes          2dbb28857263    β€”               ⚠ orphan

  1 orphan(s) in DB no longer declared: splent_feature_notes
  Run 'splent db:rollback <feature>' to clean up, or ignore if tables should be kept.

Status values

Status Meaning
βœ” synced Applied revision matches the latest migration file.
⚠ pending Migration files exist that haven’t been applied yet. Run db:upgrade.
⚠ not applied Feature has migration files but none have been applied. Run db:upgrade.
⚠ no files Feature is declared and has a DB entry but no migration files on disk.
⚠ orphan Feature has a DB entry but is no longer declared in pyproject.toml.
β€” none Feature has no migrations (neither applied nor on disk).

Orphan detection

When a feature is removed from the product but its splent_migrations entry remains in the database, it is shown as ⚠ orphan. Orphans are not counted in the β€œout of sync” total because db:upgrade cannot fix them.

To clean up an orphan entry, run splent db:rollback <feature> – it will detect the orphan and offer to remove the database entry.


Requirements

  • SPLENT_APP must be set.
  • The database must be reachable.
  • The splent_migrations table must exist (created automatically by MigrationManager on app startup).

Back to top

splent. Distributed by an LGPL license v3. Contact us: drorganvidez@us.es