django - generate CREATE TABLE sql for models

Viewed 984

Is there any way in django to generate the CREATE TABLE script for my models for a particular DB engine? (MySQL in my case)

1 Answers

you can use command in console

python manage.py sqlmigrate <appname> migration_name

where migration name is the name of file with migration that you need. e.g.

python manage.py sqlmigrate manager 0001_initial
Related