Opened 10 years ago
Closed 10 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 )
./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 , 10 years ago
| Description: | modified (diff) |
|---|
comment:2 by , 10 years ago
| Cc: | added |
|---|
comment:3 by , 10 years ago
| Resolution: | → wontfix |
|---|---|
| Status: | new → closed |
| Type: | Uncategorized → New feature |
The
sqlcommand is deprecated and removed in Django 1.9. Its successorsqlmigraterequires 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.