1
0
mirror of synced 2025-01-31 12:32:59 +03:00
This commit is contained in:
zYne 2007-03-23 16:45:24 +00:00
parent ef7f3c2bf1
commit cd78c4f600

View File

@ -494,6 +494,8 @@ class Doctrine_Export extends Doctrine_Connection_Module
* Text value with the default COLLATION for this field.
* unique
* unique constraint
* check
* column check constraint
*
* @return string DBMS specific SQL code portion that should be used to
* declare the specified field.
@ -514,6 +516,9 @@ class Doctrine_Export extends Doctrine_Connection_Module
$unique = (isset($field['unique']) && $field['unique']) ?
' ' . $this->getUniqueFieldDeclaration() : '';
$check = (isset($field['check']) && $field['check']) ?
' ' . $field['check'] : '';
$method = 'get' . $field['type'] . 'Declaration';
if (method_exists($this->conn->dataDict, $method)) {
@ -521,7 +526,7 @@ class Doctrine_Export extends Doctrine_Connection_Module
} else {
$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