... 用して追加できます。このドキュメントでは、 index options を含む Index の API リファレンスを説明します。 ビルトインの indexes を参照する Indexes は django.db.models.indexes で定義されていますが、簡単のため、 django.db.models 内にインポートされていま ... す。 from django.db import models を使用して、indexes を models.<IndexClass> として参照するのが標準的な慣習です。 Index オプション ¶ class Index ( * expressions , fields = () , ... せんが、PostgreSQL はエラーを起こします。これは、 Concat() などの関数が受け入れられないことを意味します。 MariaDB Functional indexes are unsupported and ignored with MariaDB. fields ¶ Index. fields ¶ インデックスが必要なフィールド名のリストまたはタプル。 ... ... 用して追加できます。このドキュメントでは、 index options を含む Index の API リファレンスを説明します。 ビルトインの indexes を参照する Indexes は django.db.models.indexes で定義されていますが、簡単のため、 django.db.models 内にインポートされていま ... す。 from django.db import models を使用して、indexes を models.<IndexClass> として参照するのが標準的な慣習です。 Index オプション ¶ class Index ( * expressions , fields = () , ... せんが、PostgreSQL はエラーを起こします。これは、 Concat() などの関数が受け入れられないことを意味します。 MariaDB Functional indexes are unsupported and ignored with MariaDB. fields ¶ Index. fields ¶ インデックスが必要なフィールド名のリストまたはタプル。 ... ... ass TablespaceExample ( models . Model ): name = models . CharField ( max_length = 30 , db_index = True , db_tablespace = "indexes" ) data = models . CharField ( max_length = 255 , db_index = True ) shortcut = models . CharField ( max_length = 7 ) edges ... = models . ManyToManyField ( to = "self" , db_tablespace = "indexes" ) class Meta : db_tablespace = "tables" indexes = [ models . Index ( fields = [ "shortcut" ], db_tablespace = "other_inde ... ーブルと多対多テーブル) は tables テーブル空間に格納されます。name フィールドのインデックスと多対多テーブルのインデックスは indexes テーブル空間に格納されます。 data フィールドもインデックスを生成しますが、テーブル空間が指定されていないため、デフォルトで ... ... ass TablespaceExample ( models . Model ): name = models . CharField ( max_length = 30 , db_index = True , db_tablespace = "indexes" ) data = models . CharField ( max_length = 255 , db_index = True ) shortcut = models . CharField ( max_length = 7 ) edges ... = models . ManyToManyField ( to = "self" , db_tablespace = "indexes" ) class Meta : db_tablespace = "tables" indexes = [ models . Index ( fields = [ "shortcut" ], db_tablespace = "other_inde ... ーブルと多対多テーブル) は tables テーブル空間に格納されます。name フィールドのインデックスと多対多テーブルのインデックスは indexes テーブル空間に格納されます。 data フィールドもインデックスを生成しますが、テーブル空間が指定されていないため、デフォルトで ... ... ugh tables cannot be generated currently. See the DEFAULT_AUTO_FIELD docs for details on migrating such tables. Functional indexes ¶ The new *expressions positional argument of Index() enables creating functional indexes on expressions and database func ... = models . CharField ( max_length = 255 ) height = models . IntegerField () weight = models . IntegerField () class Meta : indexes = [ Index ( Lower ( "first_name" ), Upper ( "last_name" ) . desc (), name = "first_last_name_idx" , ), Index ( F ( "height ... " ) / ( F ( "weight" ) + Value ( 5 )), name = "calc_idx" , ), ] Functional indexes are added to models using the Meta.indexes option. pymemcache support ¶ 新たなキャッシュバックエンドである django.core.cac ... ... ugh tables cannot be generated currently. See the DEFAULT_AUTO_FIELD docs for details on migrating such tables. Functional indexes ¶ The new *expressions positional argument of Index() enables creating functional indexes on expressions and database func ... = models . CharField ( max_length = 255 ) height = models . IntegerField () weight = models . IntegerField () class Meta : indexes = [ Index ( Lower ( "first_name" ), Upper ( "last_name" ) . desc (), name = "first_last_name_idx" , ), Index ( F ( "height ... " ) / ( F ( "weight" ) + Value ( 5 )), name = "calc_idx" , ), ] Functional indexes are added to models using the Meta.indexes option. pymemcache support ¶ 新たなキャッシュバックエンドである django.core.cac ... ... Xor() aggregate function returns an int of the bitwise XOR of all non-null input values. SpGistIndex now supports covering indexes on PostgreSQL 14+. ExclusionConstraint now supports covering exclusion constraints using SP-GiST indexes on PostgreSQL 14+ ... ion command allows optimizing operations for a migration. マイグレーション ¶ The new RenameIndex operation allows renaming indexes defined in the Meta.indexes or index_together options. The migrations autodetector now generates RenameIndex operations in ... stead of RemoveIndex and AddIndex , when renaming indexes defined in the Meta.indexes . The migrations autodetector now generates RenameIndex operations instead of AlterIndexTogeth ... ... model containing partial indexes ( #30754 ). Fixed a regression in Django 2.2.4 that caused a crash when filtering with a Subquery() annotation of a querys ... ーワード Fixed crash containing リリースノート October fixes several bugs バグ 修正 migrations SQLite altering model partial indexes regression caused filtering Subquery annotation queryset contrib postgres fields クイック検索 Last update: 2026年10月09日 ... ... Xor() aggregate function returns an int of the bitwise XOR of all non-null input values. SpGistIndex now supports covering indexes on PostgreSQL 14+. ExclusionConstraint now supports covering exclusion constraints using SP-GiST indexes on PostgreSQL 14+ ... ion command allows optimizing operations for a migration. マイグレーション ¶ The new RenameIndex operation allows renaming indexes defined in the Meta.indexes or index_together options. The migrations autodetector now generates RenameIndex operations in ... stead of RemoveIndex and AddIndex , when renaming indexes defined in the Meta.indexes . The migrations autodetector now generates RenameIndex operations instead of AlterIndexTogeth ... ... model containing partial indexes ( #30754 ). Fixed a regression in Django 2.2.4 that caused a crash when filtering with a Subquery() annotation of a querys ... Django Fixed crash containing リリースノート October fixes several bugs バグ 修正 migrations SQLite altering model partial indexes regression caused filtering 関連するページ Django 1.11.25 リリースノート Django 2.1.13 リリースノート Django 3.0.6 リリース ... 2026年10月08日