python - Django (pre1.7) management command to run the customsql for an app -


django (pre 1.7 , pre-the new migration functionality), has management command sqlcustom display custom sql run app. prints terminal. there single django management command run migrations?

i'm using django pre1.7 project uses south migrations, , have custom sql (for sql views), , want have database stuff done via migrations. custom sql loaded syncdb on vanilla django, when use south, overrides syncdb , doesn't run custom sql. i'd create south migration app simple , calls management command load custom sql. (you can call django management commands inside python). don't want duplicate sql inside migration.

you can pipe output of sqlcustom dbshell. this:

django-admin.py sqlcustom myapp > django-admin.py dbshell 

Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

angularjs - ng-repeat duplicating items after page reload -