30 extends Zend_Validate_Abstract
32 const NAME_EMPTY =
'columnNameEmpty';
33 const EXISTS =
'columnExists';
38 protected $_messageTemplates = array(
39 self::NAME_EMPTY =>
"Column name can not be empty",
40 self::EXISTS =>
"Column with name %value% alteady exists in table"
54 $value = $schema->getName();
57 $this->_error(self::NAME_EMPTY);
60 if ($schema && $value !== $schema->getOriginName()) {
61 if ($schema->getTable()->columns()->has($value)) {
62 $this->_error(self::EXISTS, $value);