dolthub / dolthub/dolt

Restrictions on foreign keys on stored generated column

Open
#11,083 1 comment 0 reactions 0 assignees View on GitHub
correctness sql
Dominant language
Go
Stars
24.4k
Forks
873
Avg merge
1d 5h
Merged PRs (30d)
108

Description

This is a separate but related issue to #11065, where we discovered MySQL has restrictions on foreign keys on columns that are referenced by stored generated columns. MySQL also has restrictions on foreign keys on stored generated columns themselves.

From [MySQL docs](https://dev.mysql.com/doc/refman/8.4/en/create-table-foreign-keys.html#foreign-key-referential-actions):
> A foreign key constraint on a stored generated column cannot use CASCADE, SET NULL, or SET DEFAULT as ON UPDATE referential actions, nor can it use SET NULL or SET DEFAULT as ON DELETE referential actions.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.