Skip to content

Commit ed1e90e

Browse files
authored
Update README.md
1 parent 9e7b5d9 commit ed1e90e

File tree

1 file changed

+35
-32
lines changed

1 file changed

+35
-32
lines changed

README.md

Lines changed: 35 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,41 @@
1212

1313
Maintain a consistent migration history when conflicts occur as a result of changes made using different versions of the default branch.
1414

15+
## Installation
16+
17+
```bash
18+
$ pip install django-migration-fixer
19+
```
20+
21+
#### Add `migration_fixer` to your INSTALLED_APPS
22+
23+
```python
24+
25+
INSTALLED_APPS = [
26+
...,
27+
"migration_fixer",
28+
...,
29+
]
30+
31+
```
32+
33+
## Usage
34+
35+
```bash
36+
$ python manage.py makemigrations --fix
37+
```
38+
39+
By default this uses `main` as the default branch
40+
41+
### For specifying a different default branch name
42+
43+
Run:
44+
45+
```bash
46+
$ python manage.py makemigrations -b master --fix
47+
```
48+
49+
1550
## Features
1651

1752
* Resolve migration conflicts on PR branches
@@ -142,35 +177,3 @@ class Migration(migrations.Migration):
142177
### Assumptions
143178

144179
The final migration on the default branch would be used as the base for all subsequent migrations.
145-
146-
## Installation
147-
148-
```bash
149-
$ pip install django-migration-fixer
150-
```
151-
152-
#### Add `migration_fixer` to your INSTALLED_APPS
153-
154-
```python
155-
156-
INSTALLED_APPS = [
157-
...,
158-
"migration_fixer",
159-
...,
160-
]
161-
162-
```
163-
164-
## Usage
165-
166-
```bash
167-
$ python manage.py makemigrations --fix
168-
```
169-
170-
### Specifying a different default branch name
171-
172-
Run:
173-
174-
```bash
175-
$ python manage.py makemigrations -b [ default branch name ] --fix
176-
```

0 commit comments

Comments
 (0)