Skip to content

Commit 81c0a54

Browse files
committed
Update migration doc about django migrations errors
1 parent cd1d086 commit 81c0a54

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

MIGRATING_TO_SOCIAL.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,37 @@ Django users need to add the `social-auth-app-django`
2323
dependency. Those using `mongoengine`, need to add
2424
`social-auth-app-mongoengine`.
2525

26+
### Migrations
27+
28+
Several errors were reported due to migrations not applying properly
29+
when migrating to the new app, most of them are caused because the app
30+
switched names a few times, from `default` to `social_auth`, and
31+
probably something else in between. That's the reason the migrations
32+
define the `replaces` attribute, that way Django can identify already
33+
applied migrations and not run them again.
34+
35+
In order to make complete the move to the new project setup, first
36+
ensure to move to `python-social-auth==0.2.21`, run the migrations at
37+
that point, then continue with the move to the new project and run the
38+
migrations again. Steps:
39+
40+
1. Update to `0.2.21`
41+
```
42+
pip install "python-social-auth==0.2.21"
43+
```
44+
45+
2. Run migrations
46+
```
47+
python manage.py migrate
48+
```
49+
50+
3. Move to the new project
51+
52+
4. Run migrations again
53+
```
54+
python manage.py migrate
55+
```
56+
2657
### Settings
2758

2859
- Update your references to `social.*` in your settings, most notably:

0 commit comments

Comments
 (0)