retrieve mysql output from django 'manage.py sql appname' -


i wondering if there way retrieve mysql code db setup. right it's using sqlite output when run 'manage.py sql management'

see below:

mb-pr0:users jg$ python manage.py sql management begin; create table "management_service" (     "id" integer not null primary key,     "service_name" varchar(32) not null ) ; create table "management_employee_services" (     "id" integer not null primary key,     "employee_id" integer not null,     "service_id" integer not null references "management_service" ("id"),     unique ("employee_id", "service_id") ) ; create table "management_employee" (     "id" integer not null primary key,     "first_name" varchar(32) not null,     "last_name" varchar(32) not null,     "email" varchar(32) not null,     "gmail_active" bool not null,     "employee_status" bool not null ) ; create table "management_note" (     "id" integer not null primary key,     "note_name" text not null,     "employee_id" integer not null references "management_employee" ("id") ) ; commit; 

is there way have output mysql?

thanks!

  1. change settings.py file use mysql
  2. run manage.py sql management
  3. change settings.py file back.

i think should work. i've never tried though.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -