browniebroke/django-remake-migrations
关于
A Django admin command to recreate all migrations in a project.
网站与应用开发实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Django remake migrations
Documentation: https://django-remake-migrations.readthedocs.io
Source Code: https://github.com/browniebroke/django-remake-migrations
A Django admin command to recreate all migrations in a project. Like a squashmigrations command on steroids.
The problem
The built-in squashmigrations command is great, but it only work on a single app at a time, which means that you need to run it for each app in your project. On a project with enough cross-apps dependencies, it can be tricky to run.
This command aims at solving this problem, by recreating all the migration files in the whole project, from scratch, and mark them as applied by using the replaces attribute.
It makes an important trade-off though: it does NOT try to be correct when setting the replaces attribute. The only guarantees are that:
- all old migrations are marked as replaced once.
- all new migrations replace at least one of the old migrations
This is OK to make this trade-off as long as all your environments are fully migrated when you deploy the remade migrations.
Contributors ✨
Thanks goes to these wonderful people (emoji key):
Bruno Alla 💻 🤔 📖 |
Dmytro Litvinov 📖 |
Mikuláš Poul 💻 🤔 |
Adam Johnson 🐛 |
This project follows the all-contributors specification. Contributions of any kind welcome!
Credits
This package was created with Copier and the browniebroke/pypackage-template project template.
探索相关项目
加载中…