This commit is contained in:
parent
ef7f3c2bf1
commit
cd78c4f600
@ -494,6 +494,8 @@ class Doctrine_Export extends Doctrine_Connection_Module
|
|||||||
* Text value with the default COLLATION for this field.
|
* Text value with the default COLLATION for this field.
|
||||||
* unique
|
* unique
|
||||||
* unique constraint
|
* unique constraint
|
||||||
|
* check
|
||||||
|
* column check constraint
|
||||||
*
|
*
|
||||||
* @return string DBMS specific SQL code portion that should be used to
|
* @return string DBMS specific SQL code portion that should be used to
|
||||||
* declare the specified field.
|
* declare the specified field.
|
||||||
@ -513,6 +515,9 @@ class Doctrine_Export extends Doctrine_Connection_Module
|
|||||||
|
|
||||||
$unique = (isset($field['unique']) && $field['unique']) ?
|
$unique = (isset($field['unique']) && $field['unique']) ?
|
||||||
' ' . $this->getUniqueFieldDeclaration() : '';
|
' ' . $this->getUniqueFieldDeclaration() : '';
|
||||||
|
|
||||||
|
$check = (isset($field['check']) && $field['check']) ?
|
||||||
|
' ' . $field['check'] : '';
|
||||||
|
|
||||||
$method = 'get' . $field['type'] . 'Declaration';
|
$method = 'get' . $field['type'] . 'Declaration';
|
||||||
|
|
||||||
@ -521,7 +526,7 @@ class Doctrine_Export extends Doctrine_Connection_Module
|
|||||||
} else {
|
} else {
|
||||||
$dec = $this->conn->dataDict->getNativeDeclaration($field);
|
$dec = $this->conn->dataDict->getNativeDeclaration($field);
|
||||||
}
|
}
|
||||||
return $this->conn->quoteIdentifier($name, true) . ' ' . $dec . $charset . $default . $notnull . $unique . $collation;
|
return $this->conn->quoteIdentifier($name, true) . ' ' . $dec . $charset . $default . $notnull . $unique . $check . $collation;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* getDefaultDeclaration
|
* getDefaultDeclaration
|
||||||
|
Loading…
x
Reference in New Issue
Block a user