30 extends Zend_Validate_Abstract
32 const NAME_EMPTY =
'tableNameEmpty';
33 const EXISTS =
'tableExists';
38 protected $_messageTemplates = array(
39 self::NAME_EMPTY =>
"Table name can not be empty",
40 self::EXISTS =>
"Table with name %value% alteady exists"
54 $value = $schema->getName();
57 $this->_error(self::NAME_EMPTY);
60 if ($schema && $value !== $schema->getOriginName()) {
61 if ($schema->getAdapter()->hasTable($value)) {
62 $this->_error(self::EXISTS, $value);