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

前端 未结 10 1041
挽巷
挽巷 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:34

    The simplest way to do this on django >= 1.9 is to run the following:

    ./manage.py migrate app_name zero
    

    That will remove your tables and revert all migrations.

提交回复
热议问题