1
0
Fork 0
mirror of synced 2025-03-29 11:19:50 +03:00
This commit is contained in:
zYne 2007-04-03 21:19:24 +00:00
parent 4676d8f4bb
commit b47381df1c

View file

@ -678,13 +678,15 @@ class Doctrine_Export extends Doctrine_Connection_Module
$keyword = ($v == 'onUpdate') ? ' ON UPDATE ' : ' ON DELETE ';
if (isset($definition[$v])) {
switch ($definition[$v]) {
$upper = strtoupper($definition[$v]);
switch ($upper) {
case 'CASCADE':
case 'SET NULL':
case 'NO ACTION':
case 'RESTRICT':
case 'SET DEFAULT':
$sql .= $keyword . $definition[$v];
$sql .= $keyword . $upper;
break;
default:
throw new Doctrine_Export_Exception('Unknown foreign key referential action option given.');