Django migrate : doesn't create tables

前端 未结 10 1714
独厮守ぢ
独厮守ぢ 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:41

    Please check if you are using multiple databases in your project. If multiple databases configured, check the default database is the one you are looking for.

    If default and your expected database are different, run below command pointing to your db configuration.

    python manage.py migrate $app_name --database $dbname_from_setting

    Hope this helps.

提交回复
热议问题