/** * create division table * * @param ConfigEntity $config document's instance config * @return void */ protected function createDivisionTable(ConfigEntity $config) { $table = $this->getDivisionTableName($config); $schema = $this->connection->getSchemaBuilder(); if ($schema->hasTable($table)) { throw new DivisionTableAlreadyExistsException(); } $schema->setConnection($this->connection->master()); $migration = new DocumentMigration(); $migration->createDivision($schema, $table); }