Django 1.7 migrations won't recreate a dropped table, why?

前端 未结 10 1054
挽巷
挽巷 2020-12-23 14:16

Using Django 1.7 migrations.

I accidentally dropped a table in my database. I assumed that by running migration again this would recreate the table but no, Django st

10条回答
  •  悲哀的现实
    2020-12-23 14:44

    Go to your database and find the table django_migrations. Delete all the rows which have app equals your app name.

    Then do a makemigrations & migrate will work.

提交回复
热议问题