Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider a package to control when migrations are run on deployment #356

Open
tim-schilling opened this issue Mar 29, 2024 · 0 comments
Open
Labels

Comments

@tim-schilling
Copy link
Member

Our deployment process runs our migrations before the web code is deployed. This is satisfactory for 80% of what we need. In the cases where we'd want to migrate after the code change is deployed (removing a column), we'd need to split the work up into two separate deployments.

There are packages out there that help with this such as https://github.com/aspiredu/django-safemigrate/. It involves decorating the migrations with a member that indicates on what side of the deployment the migration should be run and change the post build script to run the package's version of migrate.

The main benefit of this is that we reduce how many deployments we make. And considering we tend to let our production releases build up (as of now), it seems like a good idea to protect ourselves in regards to deploying database schema changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant