mirror of
https://github.com/django/django.git
synced 2025-11-19 03:08:59 +00:00
Fixed #36611, Refs #36580 -- Added system check for multicolumn ForeignObject in Meta.indexes/constraints/unique_together.
Some checks are pending
Docs / spelling (push) Waiting to run
Docs / blacken-docs (push) Waiting to run
Docs / lint-docs (push) Waiting to run
Linters / flake8 (push) Waiting to run
Linters / isort (push) Waiting to run
Linters / black (push) Waiting to run
Tests / Windows, SQLite, Python 3.13 (push) Waiting to run
Tests / JavaScript tests (push) Waiting to run
Some checks are pending
Docs / spelling (push) Waiting to run
Docs / blacken-docs (push) Waiting to run
Docs / lint-docs (push) Waiting to run
Linters / flake8 (push) Waiting to run
Linters / isort (push) Waiting to run
Linters / black (push) Waiting to run
Tests / Windows, SQLite, Python 3.13 (push) Waiting to run
Tests / JavaScript tests (push) Waiting to run
ForeignObjects with multiple `from_fields` are not supported in these options. Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com> Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
This commit is contained in:
parent
edde2891c3
commit
5b51e6f759
4 changed files with 69 additions and 0 deletions
|
|
@ -443,6 +443,9 @@ Models
|
|||
* **models.E048**: ``constraints/indexes/unique_together`` refers to a
|
||||
``CompositePrimaryKey`` ``<field name>``, but ``CompositePrimaryKey``\s are
|
||||
not supported for that option.
|
||||
* **models.E049**: ``constraints/indexes/unique_together`` refers to a
|
||||
``ForeignObject`` ``<field name>`` with multiple ``from_fields``, which is
|
||||
not supported for that option.
|
||||
|
||||
Management Commands
|
||||
-------------------
|
||||
|
|
|
|||
|
|
@ -295,6 +295,10 @@ Models
|
|||
don't support it (MySQL and MariaDB), the fields are marked as deferred to
|
||||
trigger a refresh on subsequent accesses.
|
||||
|
||||
* Using a :ref:`ForeignObject <cpk-and-relations>` with multiple
|
||||
``from_fields`` in Model indexes, constraints, or :attr:`unique_together
|
||||
<django.db.models.Options.unique_together>` now emits a system check error.
|
||||
|
||||
Pagination
|
||||
~~~~~~~~~~
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue