Closed ryanhiebert closed 1 month ago
I don't know about this. Allowing app users to completely undo their database from the admin seems wrong.
I was more thinking for forward migrations, particularly Safe.after_deploy
ones that safemigrate
won't run because they don't have a delay or because there isn't a good way to run migrations after deployment.
Yes, but if you allow them to migrate forwards, they will need to migrate backwards in cases of trouble.
I'm not sure that it's something we should actively avoid, but I think there's enough hesitation here that neither of us is excited about this idea.
We could add a Django admin action to run migrations. I'm not sure exactly what that looks like. This feels potentially dangerous, but also pretty helpful. We can have a permission on our
SafeMigration
model, now that it exists. We might be able to use the proposed background workers API.