Opened 11 years ago

Last modified 3 weeks 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

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.

Change History (6)

comment:1 by Shai Berger, 11 years ago

Why in OPTIONS, and not in the main dictionary?

My understanding is that OPTIONS is for backend-specific parameters.

comment:2 by Aymeric Augustin, 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.

Last edited 11 years ago by Aymeric Augustin (previous) (diff)

comment:3 by no, 10 years ago

Cc: django@… added

comment:4 by bcail, 9 months ago

Cc: bcail added
Has patch: set
Owner: changed from nobody to bcail
Status: newassigned

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 Mariusz Felisiak, 9 months ago

Patch needs improvement: set

comment:6 by bcail, 3 weeks ago

Owner: bcail removed
Status: assignednew
Note: See TracTickets for help on using tickets.
Back to Top