Django migrate : doesn't create tables

前端 未结 10 1725
独厮守ぢ
独厮守ぢ 2021-01-31 18:03

After some errors, I dropped my database, deleted all my migration files (I left init.py). Now, when I run

python migrate.py makemigrations   /         


        
10条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-31 18:39

    python manage.py migrate --fake APPNAME zero
    

    This will make your migration to fake. Now you can run the migrate script

    python manage.py migrate APPNAME
    

    Tables will be created and you solved your problem.. Cheers!!!

提交回复
热议问题