So first I ran makemigrations
and then I ran migrate
and got the error ValueError: The database backend does not accept 0 as a value for AutoField.
So I went ahead, modified my models.py
to fix that error.
Now, when I run makemigrations
to start over again, it works. Then migrate
didn't actually do anything but show the error again. So there is a migration there that is bad, then there is one after that is proper.
So I tried running ./manage.py migrate --fake mainapp zero
after reading it on Stack Overflow and now it's saying django.db.utils.OperationalError: (1050, "Table 'mainapp_article' already exists")
.
Any ideas how I can get back to where I started, and retry the makemigrations now with the error removed from models.py?