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_APPmust be set.- The database must be reachable.
- The
splent_migrationstable must exist (created automatically byMigrationManageron app startup).