0

I'm getting this error when I'm trying to migrate on an Azure SQL Server db. This project also has a local mysql database and relationships between the two DB's but that doesn't seem to be at issue here

I've tried deleting and squashing the migrations. I've tried --fake-initial. I have realized, though, that the issue is just that django isn't preventing itself from trying to create the table if it already exists during the migration.

I'm curious if there's a setting to prevent django from just sending a create command during the migration if the table already exists.

For now since I'm just developing I can just nuke the DB and start over, but this isn't going to work if I modify a column and try to migrate it in production

Anyone run into this?

scl
  • 93
  • 9
  • Check out explanation regarding `--fake` vs. `--fake-initial` [here](https://stackoverflow.com/questions/46772762/django-migrate-fake-and-fake-initial-explained) – DanielM Jun 12 '19 at 01:06
  • maybe you tried to delete and squash migrations and they don't match anymore with your DB. Try to migrate on a fresh new created db. – Emilio Conte Jun 12 '19 at 05:48

0 Answers0