8๐
โ
1) Identify your last success migration:
./manage.py showmigrations mainapp
[X] 0001_initial
[X] 0002_auto_20160425_0102
[X] 0003_auto_20160426_2022
[X] 0004_auto_20160427_0036
2) Then use migrate to migrate your database to that specified migration point.
./manage.py migrate mainapp 0003_auto_20160426_2022
In this example Iโm assuming the 0003 migration was success while the 0004 wasnโt.
3) Remove the migration file
rm mainapp/migrations/0004_auto_20160427_0036.py*
4) Run makemigrations and migrate again.
๐คslackmart
- [Django]-Dynamicly update the queryset of ModelMultipleChoiceField in ModelForm
- [Django]-Django: Store Hierarchical Data
- [Django]-In Django templates, `Context` is a stack. What for?
- [Django]-Django. Get only current day. Only day without time
- [Django]-Reverse Not Found: Sending Request Context in from templates
Source:stackexchange.com