You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 methodMigrateWithOptions(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.
The text was updated successfully, but these errors were encountered: