... クエンド Third-party database backends can now skip or mark as expected failures tests in Django's test suite using the new DatabaseFeatures.django_test_skips and django_test_expected_failures attributes. デコレータ The new no_append_slash() decorator allows indi ... ド API このセクションでは、サードパーティのデータベースバックエンドで必要になる可能性のある変更について説明します。 The new DatabaseFeatures.introspected_field_types property replaces these features: can_introspect_autofield can_introspect_big_integer_field can_i ... To enable support for covering indexes ( Index.include ) and covering unique constraints ( UniqueConstraint.include ), set DatabaseFeatures.supports_covering_indexes to True . Third-party database backends must implement support for column database collations on ... ... 可能性のある変更について説明します。 Third-party database backends must implement support for table check constraints or set DatabaseFeatures.supports_table_check_constraints to False . Third party database backends must implement support for ignoring constraints ... or uniqueness errors while inserting or set DatabaseFeatures.supports_ignore_conflicts to False . Third party database backends must implement introspection for DurationField or set D ... atabaseFeatures.can_introspect_duration_field to False . DatabaseFeatures.uses_savepoints now defaults to True . Third party database backends must implement support for partial indexes or set Dat ... ... od now uses the database of the called instance. Third-party database backends must implement support for JSONField or set DatabaseFeatures.supports_json_field to False . If storing primitives is not supported, set DatabaseFeatures.supports_primitives_in_json_fi ... eld to False . If there is a true datatype for JSON, set DatabaseFeatures.has_native_json_field to True . If jsonfield.contains and jsonfield.contained_by are not supported, set DatabaseFeatures.s ... ... r_table , db_on_delete ) as values. db_on_delete is one of the database-level delete options e.g. DB_CASCADE . Set the new DatabaseFeatures.supports_inspectdb attribute to False if the management command isn't supported. The DatabaseFeatures.prohibits_dollar_sig ... expected to return a two-elements tuple composed of an SQL format string and a tuple of associated parameters. Set the new DatabaseFeatures.supports_bit_aggregations attribute to False if the database doesn't support bitwise aggregations. django.contrib.admin Th ... ... t argument of SchemaEditor._create_index_name() is now table_name rather than model . To enable FOR UPDATE OF support, set DatabaseFeatures.has_select_for_update_of = True . If the database requires that the arguments to OF be columns rather than tables, set Dat ... abaseFeatures.select_for_update_of_column = True . To enable support for Window expressions, set DatabaseFeatures.supports_over_clause to True . You may need to customize the DatabaseOperations.window_start_rows_start_end() and/or windo ... ... エンドで必要になる可能性のある変更について説明します。 データベースがデフォルトでデータベース関数をサポートしていない場合、 DatabaseFeatures.supports_expression_defaults を False に設定する必要があります。 データベースが INSERT クエリ内で DEFAULT キーワードをサポ ... ートしていない場合、 DatabaseFeatures.supports_default_keyword_in_insert を False に設定する必要があります。 データベースがバルク INSERT クエリ内で DEFAULT キー ... ワードをサポートしていない場合、 DatabaseFeatures.supports_default_keyword_in_bulk_insert を False に設定する必要があります。 django.contrib.gis GDAL 2.2 および 2.3 のサポー ... ... skipped if run with a different backend. Some tests are skipped or expected failures on a particular database backend (see DatabaseFeatures.django_test_skips and DatabaseFeatures.django_test_expected_failures on each backend). To run the tests with different set ... ... t is now supported on MySQL 8.0.16+. The new allows_group_by_selected_pks_on_model() method of django.db.backends.base.BaseDatabaseFeatures allows optimization of GROUP BY clauses to require only the selected models' primary keys. By default, it's supported only ... ame SQL statement that adds a field, add SchemaEditor.sql_create_column_inline_fk with the appropriate SQL; otherwise, set DatabaseFeatures.can_create_inline_fk = False . DatabaseFeatures.can_return_id_from_insert and can_return_ids_from_bulk_insert are renamed ... ... odel という機能を変更する例です: mysite/mydbengine/base.py from django.db.backends.postgresql import base , features class DatabaseFeatures ( features . DatabaseFeatures ): def allows_group_by_selected_pks_on_model ( self , model ): return True class DatabaseWra ... pper ( base . DatabaseWrapper ): features_class = DatabaseFeatures 最後に、 settings.py ファイルで DATABASE-ENGINE を指定する必要があります: DATABASES = { "default" : { "ENGINE" : "mydbengi ... ... uments and returns the SQL necessary to cast a datetime value to time value. To enable FOR UPDATE SKIP LOCKED support, set DatabaseFeatures.has_select_for_update_skip_locked = True . The new DatabaseFeatures.supports_index_column_ordering attribute specifies if ... 2026年10月08日