BUG 6691 Do not allow default values for text
This commit is contained in:
@@ -740,6 +740,8 @@ class Column extends XMLElement {
|
||||
$dflt = "";
|
||||
if ($this->getDefaultValue() !== null) {
|
||||
$dflt .= "default ";
|
||||
if ($this->getType() == "LONGVARCHAR")
|
||||
throw new Exception("ERROR: Text cannot have default value (column: '{$this->name}', type: '{$this->getType()}', default: '{$this->getDefaultValue()}')");
|
||||
if (PropelTypes::isTextType($this->getType())) {
|
||||
$dflt .= '\'' . $this->getPlatform()->escapeText($this->getDefaultValue()) . '\'';
|
||||
} elseif ($this->getType() == PropelTypes::BOOLEAN) {
|
||||
|
||||
Reference in New Issue
Block a user