Moss/Storage/Schema/Schema.php
protected function buildCreate(array $models)
    {
        $schemaManager = $this->connection->getSchemaManager();

        foreach ($models as $model) {
            if ($schemaManager->tablesExist([$model->table()])) {
                throw new SchemaException(sprintf('Unable to create table, table "%s" already exists', $model->table()));
            }

            $this->createTable($this->schema, $model);
        }

        $this->queries = array_merge(
            $this->queries,
            $this->schema->toSql($this->connection->getDatabasePlatform())
        );
    }
protected function buildCreate(array $models)
    {
        $schemaManager = $this->connection->getSchemaManager();

        foreach ($models as $model) {
            if ($schemaManager->tablesExist([$model->table()])) {
                throw new SchemaException(sprintf('Unable to create table, table "%s" already exists', $model->table()));
            }

            $this->createTable($this->schema, $model);
        }

        $this->queries = array_merge(
            $this->queries,
            $this->schema->toSql($this->connection->getDatabasePlatform())
        );
    }
protected function buildCreate ( array $ models ) { $ schemaManager = $ this -> connection -> getSchemaManager ( ) ; foreach ( $ models as $ model ) { if ( $ schemaManager -> tablesExist ( [ $ model -> table ( ) ] ) ) { throw new SchemaException ( sprintf ( 'Unable to create table, table "%s" already exists' , $ model -> table ( ) ) ) ; } $ this -> createTable ( $ this -> schema , $ model ) ; } $ this -> queries = array_merge ( $ this -> queries , $ this -> schema -> toSql ( $ this -> connection -> getDatabasePlatform ( ) ) ) ; }
Builds create table queries

@param ModelInterface[] $models

@throws SchemaException
Builds create table queries