Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

magento/devdocs#: schema.db does not support ON UPDATE action for constraints #5717

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,9 @@ Attribute | Description
`referenceColumn`| A column in the `referenceTable`
`onDelete` | Foreign key trigger. The value must be `CASCADE`, `SET NULL`, or `NO ACTION`

{: .bs-callout-info }
To keep entity identifiers as immutable values, the declarative schema does not support `ON UPDATE` action for `constraint`.

Example:

```xml
Expand Down Expand Up @@ -437,7 +440,7 @@ It is possible to drop a foreign key only if it exists in the `db_schema_whiteli
In this example, Module A defines a new table with primary key `id_column`. Module B declares its own schema, in which it creates a new column (`new_id_column`) and changes the primary index to this column.
Module B disables the original primary key and sets a new primary key with a `referenceId` value that is different from PRIMARY. Although this value is different, the real name of the primary key in the database remains PRIMARY.

**Module A declaration**
**Module A declaration**

```xml
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand All @@ -451,7 +454,7 @@ Module B disables the original primary key and sets a new primary key with a `re
</schema>
```

**Module B declaration**
**Module B declaration**

```xml
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand Down