Skip to content

Commit 26b3a0c

Browse files
committed
Fix README Typos
1 parent cb8f6f3 commit 26b3a0c

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# django-replace-migrations
22

33
This package is an extension to djangos `makemigrations.py`.
4-
It can be used to get rid of old migrations as alternative to djangos `squashmigration` command.
4+
It can be used to get rid of old migrations as an alternative to djangos `squashmigration` command.
55

66
## Reasoning
77

8-
In big django projects, migration files easily pile up and get a increasing problem.
8+
In big django projects, migration files easily pile up and get an increasing problem.
99
Django comes with the squashmigration command - however, it is hard to handle because of multiple reasons.
1010
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).
1111

@@ -18,7 +18,7 @@ One possible solution is to:
1818
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.\
1919

2020
With django-replace-migrations also creates new initial migrations, but also, additionally, adds the already existing migrations to the `replace` list of the new migration
21-
(That list is used by `squashmigratiions` as well). By doing that, faking migrations is not needed anymore.
21+
(That list is used by `squashmigrations` as well). By doing that, faking migrations is not needed anymore.
2222

2323
## Warning
2424

@@ -45,20 +45,20 @@ If your apps are not depending on each other, you can use django-replace-migrati
4545
./manage.py makemigratons --replace-all --name replace [app1, app2, ...]
4646
```
4747
Note, that you will need to list all of your apps explicitly - otherwise django will also try to replace migrations from dependencies.
48-
While `--name` could be omited, it is highly recommended to use it so that you can easlily recognize the new migrations.
48+
While `--name` could be omitted, it is highly recommended to use it so that you can easily recognize the new migrations.
4949

5050
If for any of your apps there are not one but two or more migrations created, your apps are depending on each other (see below).
5151

52-
You can leave your old migrations in the codebase. Old versons will continue to use the old migrations, while fresh installations will use the newly created replace migration instead.
52+
You can leave your old migrations in the codebase. Old versions will continue to use the old migrations, while fresh installations will use the newly created replace migration instead.
5353

54-
If you remove the old migrations later, you will need to update the dependencies in your other migrations and repalce there all ocurances of the old migration with the new replace migration. You can easily do that with try-and-error (`migrate` will fail and tell you which dependency is missing)
54+
If you remove the old migrations later, you will need to update the dependencies in your other migrations and replace all occurrences of the old migration with the new replace migration. You can easily do that with try-and-error (`migrate` will fail and tell you which dependency is missing)
5555

5656

5757
## Workflow for depending apps
5858

5959
Due to the way django resolves the `replace` list, it can not handle circular dependencies within apps. To prevent an error during migration, you must delete the old migrations that you replaced.
6060

61-
If you have your application deployed on multiple servers, you must define down to which version, you will support upgrading and only replace those migratons.
61+
If you have your application deployed on multiple servers, you must define down to which version, you will support upgrading and only replace those migrations.
6262

6363
Let’s assume that our current version of the application is 3.0 and we want to get rid of all migrations prior to 2.0.
6464

@@ -70,11 +70,11 @@ The workflow for this would be:
7070
* commit and note the commit hash
7171
* `git checkout 2.0`
7272
* create a new branch `git checkout 2-0-replace-migrations`
73-
* run `./manage.py makemigrations --replace-all --name replace_2_0 [app1, app2, ...]
73+
* run `./manage.py makemigrations --replace-all --name replace_2_0 [app1, app2, ...]`
7474
* commit and note the commit hash
7575
* `git checkout [your main branch]`
76-
* `git cherry-pick [commithash from 2-0-delete-migrations]
77-
* `git cherry-pick [commithash from 2-0-replace-migrations]`
76+
* `git cherry-pick [commit-hash from 2-0-delete-migrations]`
77+
* `git cherry-pick [commit-hash from 2-0-replace-migrations]`
7878

7979
Now you have all migrations prior to 2.0 removed and replaced with new migrations.
8080

@@ -84,9 +84,9 @@ That means that:
8484
* Server database is after 2.0 -> Newly created replacement migrations will not run because all migrations they replace are already applied
8585
* Server database is fresh -> Newly created replacement migrations will run.
8686

87-
## `makemigration.py` compatebility
87+
## `makemigration.py` compatibility
8888

89-
This pagage requires deep integration into `makemigrations.py` so that I needed to copy the whole `makemigrations.py` here. Currently the version of `makemigrations.py` is copied from Django 2.1, however it is also tested with Django 3.0 and works there as well. If you encounter problems, please write what version of Django you are using.
89+
This package requires deep integration into `makemigrations.py` so that I needed to copy the whole `makemigrations.py` here. Currently the version of `makemigrations.py` is copied from Django 2.1, however it is also tested with Django 3.0 and works there as well. If you encounter problems, please write what version of Django you are using.
9090

9191

9292

0 commit comments

Comments
 (0)