Opened 8 years ago

Closed 7 years ago

#28046 closed New feature (fixed)

Add tablespace support to Index class

Reported by: Markus Holtermann Owned by: Mariusz Felisiak
Component: Database layer (models, ORM) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

For now, the django.db.models.indexes.Index class determines a non-default tablespace from its model field if the index is defined on a single field (Field.db_tablespace) or from a model's _meta.db_tablespace for multi-column indexes. Indexes on expressions, however, won't be able to identify which columns they refer to.

The initial API design would be to add db_tablespace or tablespace as an attribute to the Index class and use that if provided, and fallback to the current behavior if not given.

Change History (7)

comment:1 by Tim Graham, 8 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Mariusz Felisiak, 8 years ago

Owner: changed from nobody to Mariusz Felisiak
Status: newassigned

comment:3 by Markus Holtermann, 8 years ago

Has patch: set
Needs tests: set

comment:4 by Mariusz Felisiak, 8 years ago

Needs tests: unset

comment:5 by Tim Graham, 8 years ago

Patch needs improvement: set

comment:6 by Mariusz Felisiak, 7 years ago

Patch needs improvement: unset

comment:7 by GitHub <noreply@…>, 7 years ago

Resolution: fixed
Status: assignedclosed

In 3297dede:

Fixed #28046 -- Added the db_tablespace parameter to class-based indexes.

Thanks Markus Holtermann and Tim Graham for reviews.

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