Esempio n. 1
0
 public final function dropIndexes()
 {
     $current = Connection::getTableIndices($this->table->getName());
     $new = $this->table->getIndexes();
     $this->drop($current, $new, $this->table->getName(), 'INDEX');
 }
Esempio n. 2
0
 public static function getTable($name)
 {
     $table = new Table($name);
     self::fillTableColumns($table);
     $options = Connection::getTableStatus($table->getName());
     $table->setCollate($options['collate']);
     $table->setEngine($options['engine']);
     if (array_key_exists('autoIncrement', $options)) {
         $table->setAutoIncrement($options['autoIncrement']);
     }
     $indexes = Connection::getTableIndices($table->getName());
     $table->setIndexes($indexes);
     $references = Connection::getTableReferences($table->getName());
     $table->setReferences($references);
     return $table;
 }