/** * Wrap up table creation block & create the table */ public function end() { parent::end(); if ($this->_createTrigger) { $this->_base->createAutoincrementTrigger($this->_name, $this->_createTrigger); } }
/** * Finishes and executes table creation. * * @param string|Horde_Db_Adapter_Base_TableDefinition $name * A table name or object. * @param array $options * A list of options. See createTable(). */ public function endTable($name, $options = array()) { if ($name instanceof Horde_Db_Adapter_Base_TableDefinition) { $options = array_merge($name->getOptions(), $options); } if (isset($options['options'])) { $opts = $options['options']; } else { if (empty($options['charset'])) { $options['charset'] = $this->getCharset(); } $opts = 'ENGINE=InnoDB DEFAULT CHARSET=' . $options['charset']; } return parent::endTable($name, array_merge(array('options' => $opts), $options)); }