I added a column to my models.py
and it was giving me issues. On the road to trying to solve the problems I've done a couple things.
- Dropped the table:
./manage.py sqlclear app | ./manage.py dbshell
- Tried to "reset" the schema:
./manage.py schemamigration app --initial
- Tried to migrate:
./manage.py migrate app
After doing all these things, I get this error after trying to migrate:
FATAL ERROR - The following SQL query failed: CREATE TABLE "projects_project" ("id" integer NOT NULL PRIMARY KEY)
The error was: table "projects_project" already exists
Question: How do I repair my database? I don't care about any of the data in the db.
Edit:
One of the related posts took me to this link Django South - table already exists . Apparently if you fake the migration all is well.
./manage.py migrate myapp --fake
I'm still unsure of all the reprocussions of this but I guess thats what docs are for.