Opened 8 years ago

Closed 8 years ago

#25819 closed New feature (wontfix)

Allow dumping sql without properly setup database connection

Reported by: Christoph Egger Owned by: nobody
Component: Core (Management commands) Version: 1.8
Severity: Normal Keywords:
Cc: Christoph Egger Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Christoph Egger)

./manage.py sql $appname currently opens a full database connection to the server.

This is inconvenient for example when developing against a local sqlite and wanting to expect the resulting database scema which would e used on the production postgres system. having your local development codebase copied to the production system and having it there connect to the production database isn't really an alternative.

This happens e.g. when you codevelop non-django-ORM consumers on the same database

Change History (3)

comment:1 by Christoph Egger, 8 years ago

Description: modified (diff)

comment:2 by Christoph Egger, 8 years ago

Cc: Christoph Egger added

comment:3 by Tim Graham, 8 years ago

Resolution: wontfix
Status: newclosed
Type: UncategorizedNew feature

The sql command is deprecated and removed in Django 1.9. Its successor sqlmigrate requires a database connection and I don't believe it's feasible to remove that dependency. Feel free to reopen if you have a patch to offer.

As an FYI, we highly recommend using the same database for development and production.

Note: See TracTickets for help on using tickets.
Back to Top