/** * (re)create table * * @param DriverInterface $driver * @param string $tableName */ private function createTable(DriverInterface $driver, $tableName) { /** @var $createMigration Migration */ $createMigration = $driver->createSchemaMigration($this->conn, $tableName, MigrationInterface::CREATE_TABLE); $createMigration->importFromSchema($this->schema); if ($this->conn->getScheme() === 'mysql') { // TODO tableOptions should be defined by Schema $createMigration->setTableOption('engine', 'InnoDB'); $createMigration->setTableOption('collation', 'utf8_unicode_ci'); } $createMigration->execute(); }
/** * @return string */ public function getDatabaseName() { return $this->driver->getDatabaseName($this); }