diff --git a/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php b/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php index a2df8a1c7..f383cf458 100644 --- a/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php +++ b/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php @@ -251,10 +251,10 @@ class MySqlSchemaManager extends AbstractSchemaManager { $tableForeignKey = array_change_key_case($tableForeignKey, CASE_LOWER); - if ($tableForeignKey['delete_rule'] == "RESTRICT") { + if (!isset($tableForeignKey['delete_rule']) || $tableForeignKey['delete_rule'] == "RESTRICT") { $tableForeignKey['delete_rule'] = null; } - if ($tableForeignKey['update_rule'] == "RESTRICT") { + if (!isset($tableForeignKey['update_rule']) || $tableForeignKey['update_rule'] == "RESTRICT") { $tableForeignKey['update_rule'] = null; }