From 74f24cd99849e6fe8b907bda1a7c5f230a103af4 Mon Sep 17 00:00:00 2001 From: Ben Cail Date: Fri, 23 Feb 2024 10:16:50 -0500 Subject: [PATCH] update some docs --- docs/topics/db/tablespaces.txt | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/docs/topics/db/tablespaces.txt b/docs/topics/db/tablespaces.txt index 480d3a10c8..3326b48d64 100644 --- a/docs/topics/db/tablespaces.txt +++ b/docs/topics/db/tablespaces.txt @@ -21,11 +21,16 @@ the :attr:`~django.db.models.Options.db_tablespace` option inside the model's ``class Meta``. This option also affects tables automatically created for :class:`~django.db.models.ManyToManyField`\ s in the model. -You can use the :setting:`DEFAULT_TABLESPACE` setting to specify a default value -for :attr:`~django.db.models.Options.db_tablespace`. This is useful for setting -a tablespace for the built-in Django apps and other applications whose code you +You can use `DEFAULT_TABLESPACE` in the :setting:`OPTIONS` part of your +database configuration in :setting:`DATABASES` to specify a default value for +:attr:`~django.db.models.Options.db_tablespace`. This is useful for setting a +tablespace for the built-in Django apps and other applications whose code you cannot control. +.. warning:: + The :setting:`DEFAULT_TABLESPACE` global setting, which works the same way, + has been deprecated. + Declaring tablespaces for indexes ================================= @@ -36,13 +41,18 @@ For single field indexes, you can pass the to specify an alternate tablespace for the field's column index. If the column doesn't have an index, the option is ignored. -You can use the :setting:`DEFAULT_INDEX_TABLESPACE` setting to specify -a default value for :attr:`~django.db.models.Field.db_tablespace`. +You can use `DEFAULT_INDEX_TABLESPACE` in the :setting:`OPTIONS` part of your +database configuration in :setting:`DATABASES` to specify a default value for +:attr:`~django.db.models.Field.db_tablespace`. If :attr:`~django.db.models.Field.db_tablespace` isn't specified and you didn't -set :setting:`DEFAULT_INDEX_TABLESPACE`, the index is created in the same +set `DEFAULT_INDEX_TABLESPACE`, the index is created in the same tablespace as the tables. +.. warning:: + The :setting:`DEFAULT_INDEX_TABLESPACE` global setting, which works the + same way, has been deprecated. + An example ==========