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
Copy file name to clipboardExpand all lines: README.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,12 @@
1
-
# gg-django-replace-migrations
1
+
# django-replace-migrations
2
2
3
3
This package offers a new django command: `replace_all_migrations`.
4
4
It can be use to get rid of old migrations as an alternative to django's `squashmigration` command.
5
5
6
6
## Reasoning
7
7
8
8
In big django projects, migration files easily pile up and get an increasing problem.
9
+
9
10
Django comes with the squashmigration command - however, it is hard to handle because of multiple reasons. Especially, it can not handle circular dependencies - they must be resolved [manually and with great care](https://stackoverflow.com/questions/37711402/circular-dependency-when-squashing-django-migrations).
10
11
11
12
One possible solution is to:
@@ -16,7 +17,7 @@ One possible solution is to:
16
17
17
18
This workflow might work fine, if you have only few (production) servers - however, it becomes hard, when you have many environments with different versions of your application.
18
19
19
-
gg-django-replace-migrations also creates new initial migrations, but also, additionally, it adds the already existing migrations to the `replace` list of the new migration (That list is used by `squashmigrations` as well). By doing that, faking migrations is not needed anymore.
20
+
django-replace-migrations also creates new initial migrations, but also, additionally, it adds the already existing migrations to the `replace` list of the new migration (That list is used by `squashmigrations` as well). By doing that, faking migrations is not needed anymore.
20
21
21
22
## Warning
22
23
@@ -29,7 +30,7 @@ Before you install, read the workflow below. You need to have the app installed
29
30
Run
30
31
31
32
```
32
-
pip install gg-django-replace-migrations
33
+
pip install django-replace-migrations
33
34
```
34
35
35
36
and add `gg_django_replace_migrations` to your list of installed apps.
@@ -73,7 +74,7 @@ The workflow for this would be:
73
74
- commit and note the commit hash
74
75
-`git checkout 2.0`
75
76
- create a new branch `git checkout -b 2-0-replace-migrations`
76
-
- Install `gg-django-replace-migration` here.
77
+
- Install `django-replace-migration` here.
77
78
- run `./manage.py replace_all_migrations --name replace_2_0 app1, app2, ...` ([How to get all apps](https://stackoverflow.com/questions/4111244/get-a-list-of-all-installed-applications-in-django-and-their-attributes))
0 commit comments