Handle error ERROR 70100 (1317): foreign key constraints are not allowed, see https://code.openark.org/blog/mysql/the-problem-with-mysql-foreign-key-constraints-in-online-schema-changes
#7384
Labels
kind/feature
A request for a new feature.
team/schema
Issue for team Schema.
topic: database/vitess
topic: database-provider/planetscale
topic: dx
topic: error
Milestone
PlanetScale or Vitess (with
foreign_key_mode=disallow
) throws the following error if you try to create a foreign key:To reproduce: Run a DDL statement that creates a foreign key on a non production branch (created via UI) on a PlanetScale database.
We should catch this and output a known error message with the following message text:
(The link currently points to a rather general issue, but will be updated to point to a specific issue or documentation later)
The Vitess instances we are testing against do not show this behavior by default yet, but can be configured to do so via
FOREIGN_KEY_MODE: disallow
indocker-compose.yml
. (Outstanding PR at prisma/prisma-engines#1958)The text was updated successfully, but these errors were encountered: