Opened 11 years ago
Last modified 4 months ago
#20960 new New feature
DEFAULT_TABLESPACE should be part of DATABASES
Reported by: | Anssi Kääriäinen | Owned by: | |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | django@…, bcail | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Pull Requests: | 17902 build:success | ||
Description ¶
Currently DEFAULT_TABLESPACE is settings global. Of course, this short of thing is better set per-database. So, lets move DEFAULT_TABLESPACE and DEFAULT_INDEX_TABLESPACE to DATABASES['some_alias']['OPTIONS']
.
This also allows those databases that do not support tablespaces to throw errors if tablespace is defined in options.
According to the ticket's flags, the next step(s) to move this issue forward are:
- To improve the patch as described in the pull request review comments or on this ticket, then uncheck "Patch needs improvement".
If creating a new pull request, include a link to the pull request in the ticket comment when making that update. The usual format is:
[https://github.com/django/django/pull/#### PR]
.
Change History (6)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
Well, it depends if tablespaces are a standard concept in SQL (eg. mentioned in the ISO standard) or just something that happens to be implemented by several databases.
EDIT: a quick search in SQL 2003 gives no hit for "tablespace", supporting Anssi's original proposal.
comment:3 by , 11 years ago
Cc: | added |
---|
comment:4 by , 12 months ago
Cc: | added |
---|---|
Has patch: | set |
Owner: | changed from | to
Status: | new → assigned |
I opened a draft PR.
Some test runs are failing with the following error:
django.utils.deprecation.RemovedInDjango60Warning: The DEFAULT_TABLESPACE setting is deprecated.
How should I handle that error with the deprecated settings?
comment:5 by , 12 months ago
Patch needs improvement: | set |
---|
comment:6 by , 4 months ago
Owner: | removed |
---|---|
Status: | assigned → new |
Why in
OPTIONS
, and not in the main dictionary?My understanding is that
OPTIONS
is for backend-specific parameters.