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

Commit 2b00b89

Browse files
authored
Merge pull request #5717 from atwixfirster/schema-on-update-for-constraint
magento/devdocs#: schema.db does not support ON UPDATE action for constraints
2 parents 62d5320 + f0b66e4 commit 2b00b89

File tree

1 file changed

+5
-2
lines changed
  • guides/v2.3/extension-dev-guide/declarative-schema

1 file changed

+5
-2
lines changed

guides/v2.3/extension-dev-guide/declarative-schema/db-schema.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,9 @@ Attribute | Description
192192
`referenceColumn`| A column in the `referenceTable`
193193
`onDelete` | Foreign key trigger. The value must be `CASCADE`, `SET NULL`, or `NO ACTION`
194194

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

197200
```xml
@@ -437,7 +440,7 @@ It is possible to drop a foreign key only if it exists in the `db_schema_whiteli
437440
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.
438441
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.
439442

440-
**Module A declaration**
443+
**Module A declaration**
441444

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

454-
**Module B declaration**
457+
**Module B declaration**
455458

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

0 commit comments

Comments
 (0)