Description
There should be a way to list which migrations have been applied, and which are pending. This would be immensely helpful in trying to apply migrations to a real life environment, stage or prod, where you don't want to run queries without knowing what queries would be run. Django provides a good model for this.
Also kinda related is the concept of dry run in the migrate method. In a similar vein as above, dry run would not do any writes to the database, but just list which queries it would've run if you didn't use the dry-run option. Django doesn't support this option, but again this would be really useful is increasing confidence when using this library on live environments such as stage or prod.
Implementation: I'd add a separate function (perhaps ShowMigrations
) that lists all migrations with a status of whether they have been applied or not. For dry run, perhaps a new method MigrateWithOptions(options)
would be best, so you can extend it in the future without breaking function signature. Migrate
method could just be changed with this signature in v2 if that works.
I can take a stab at it if the this sounds reasonable.
Activity