Manage.py sqlall doesn't create tables for models in my app

前端 未结 1 456
野趣味
野趣味 2021-01-25 22:25

I want to create a table for my models in my app, apparently the \"python manage.py sqlall myapp\" doesn\'t work

I tried using the \"python manage.py sqlmigrate myapp\",

相关标签:
1条回答
  • 2021-01-25 23:13

    The sqlmigrate command just prints out the SQL for the migration, it does not run it. You should run migrate to make the changes.

    See the Migrations docs for more information about the migration commands.

    The sqlall command was removed in Django 1.9 at the same time as syncdb was removed.

    0 讨论(0)
提交回复
热议问题