Create Table Schema.

@param  \Closure  $blueprint
495446
protected function createSchema(Closure $blueprint)
    {
        if ($this->hasConnection()) {
            Schema::connection($this->getConnection())
                  ->create($this->getTableName(), $blueprint);
        }
        else {
            Schema::create($this->getTableName(), $blueprint);
        }
    }
1244170
public function compileDropColumn(Blueprint $blueprint, Fluent $command) {
        $table  = $this->wrapTable($blueprint);
        // @TODO: always one column; or more?
        $column = $command->columns[0];

        // @TODO: changed syntax; is there a better writing
        return 'DROP PROPERTY ' . $table . '.' . $column . ' IF EXISTS';
    }
945474
public function makeOtherFields (Blueprint $table)
    {
        if (count(config('categories.other_fields')) > 0) {
            foreach (config('categories.other_fields') as $filed) {

                if (isset($filed['values']) && $filed['values'] != null) {

                    if (isset($filed['nullable']) && $filed['nullable'] != false)
                        $table->{$filed['type']}($filed['column'] , $filed['values'])->default($filed['default'])->nullable();
                    else
                        $table->{$filed['type']}($filed['column'] , $filed['values'])->default($filed['default']);

                } else {

                    if (isset($filed['nullable']) && $filed['nullable'] != false)
                        $table->{$filed['type']}($filed['column'])->default($filed['default'])->nullable();
                    else
                        $table->{$filed['type']}($filed['column'])->default($filed['default']);

                }
            }
        }
    }
184850
public function create($blueprint)
    {
        $name = $blueprint->name;
        $type = $blueprint->type;
        if (!isset($this->count[$name])) {
            $this->count[$name] = 0;
        }

        $count = ++$this->count[$name];

        $values = $blueprint->values();

        $strings = array_map(function ($value) use ($count) {
            return str_replace('#{sn}', str_pad($count, 4, '0', STR_PAD_LEFT), $value);
        }, $blueprint->strings());

        $relationships = $blueprint->relationships();

        foreach ($relationships as $key => $relationship) {
            $relationships[$key] = $relationship->create($blueprint->persisted);
        }

        $values = array_merge($values, $strings, $relationships);

        $dependencies = array_map(function ($value) use ($values) {
            return $value->meet($values);
        }, $blueprint->dependencies());

        $values = array_merge($values, $dependencies);

        //$object = $this->toObject($name, $values);
        $object = $this->to_object($name, $values); // @deprecated Backwards compatibility

        if (false == $blueprint->persisted) {
            return $object;
        }

        \Phactory::triggers()->beforeSave($name, $type, $object);

        //$object = $this->saveObject($name, $object);
        $object = $this->save_object($name, $object); // @deprecated Backwards compatibility

        \Phactory::triggers()->afterSave($name, $type, $object);

        return $object;
    }
1323373
protected function createBlueprint($table, Closure $callback = null)
    {
        $prefix = $this->connection->getConfig('prefix_indexes')
                    ? $this->connection->getConfig('prefix')
                    : '';

        if (isset($this->resolver)) {
            return call_user_func($this->resolver, $table, $callback, $prefix);
        }

        return new Blueprint($table, $callback, $prefix);
    }
453025
private function createTable(Schema $schema)
    {
        $table = $schema->createTable(RdsDeliveryExecutionService::TABLE_NAME);

        $table->addOption("engine", "InnoDB");
        $table->addOption("charset", "utf8");
        $table->addOption("collate", "utf8_unicode_ci");

        $this->createColumns($table);

        /**
         * Create index for the following methods
         * @see RdsDeliveryExecutionService::getExecutionsByDelivery()
         * @see RdsDeliveryExecutionService::getUserExecutions()
         */
        $this->createIndex($table, [
            RdsDeliveryExecutionService::COLUMN_DELIVERY_ID,
            RdsDeliveryExecutionService::COLUMN_USER_ID,
        ]);

        /**
         * Create index for the following methods
         * @see RdsDeliveryExecutionService::getDeliveryExecutionsByStatus()
         */
        $this->createIndex($table, [
            RdsDeliveryExecutionService::COLUMN_USER_ID,
        ]);
    }
617386
protected function build(Blueprint $blueprint) {
        $grammar = new \Sgpatil\Orientdb\Schema\Grammars\OrientdbGrammar();
        $blueprint->build($this->connection, $grammar);
    }
653405
public function get(Blueprint $blueprint, $key, $default = null)
    {
        $default = Arr::get($this->config, "*.$key", $default);
        $schema = Arr::get($this->config, "{$blueprint->schema()}.$key", $default);
        $specific = Arr::get($this->config, "{$blueprint->qualifiedTable()}.$key", $schema);

        return $specific;
    }
990440
public function compileChange( Blueprint $blueprint, Fluent $command, Connection $connection )
	{
		if ( !$connection->isDoctrineAvailable() )
		{
			throw new RuntimeException( sprintf( 'Changing columns for table "%s" requires Doctrine DBAL; install "doctrine/dbal".', $blueprint->getTable() ) );
		}

		$schema = $connection->getDoctrineSchemaManager();

		$tableDiff = $this->getChangedDiff( $blueprint, $schema );

		if ( $tableDiff !== false )
		{
			return (array) $schema->getDatabasePlatform()->getAlterTableSQL( $tableDiff );
		}

		return [];
	}
873445
public function getDoctrineTableDiff(Blueprint $blueprint, SchemaManager $schema)
    {
        $table = $this->getTablePrefix().$blueprint->getTable();

        return tap(new TableDiff($table), function ($tableDiff) use ($schema, $table) {
            $tableDiff->fromTable = $schema->listTableDetails($table);
        });
    }
271951
def compile_create(self, blueprint, command, _):
        
        columns = ', '.join(self._get_columns(blueprint))

        sql = 'CREATE TABLE %s (%s' % (self.wrap_table(blueprint), columns)

        sql += self._add_foreign_keys(blueprint)

        sql += self._add_primary_keys(blueprint)

        return sql + ')'
330502
protected function addForeignKeys(Blueprint $blueprint)
    {
        $sql = '';

        $foreigns = $this->getCommandsByName($blueprint, 'foreign');

        // Once we have all the foreign key commands for the table creation statement
        // we'll loop through each of them and add them to the create table SQL we
        // are building, since SQLite needs foreign keys on the tables creation.
        foreach ($foreigns as $foreign) {
            $sql .= $this->getForeignKey($foreign);

            if (! is_null($foreign->onDelete)) {
                $sql .= " on delete {$foreign->onDelete}";
            }

            if (! is_null($foreign->onUpdate)) {
                $sql .= " on update {$foreign->onUpdate}";
            }
        }

        return $sql;
    }
177645
def compile_create(self, blueprint, command, _):
        
        columns = ", ".join(self._get_columns(blueprint))

        return "CREATE TABLE %s (%s)" % (self.wrap_table(blueprint), columns)
108009
protected function createBlueprint($table, Closure $callback = null)
    {
        if (isset($this->resolver))
        {
            return call_user_func($this->resolver, $table, $callback);
        }

        return new Blueprint($table, $callback);
    }
680442
public function merge(Blueprint $mergeBlueprint): Blueprint
    {
        return new Blueprint(
            $this->className,
            $this->mergeParams($mergeBlueprint),
            $this->mergeSetters($mergeBlueprint),
            $this->mergeMutations($mergeBlueprint)
        );
    }
1203351
private function fluentComments(OracleBlueprint $blueprint)
    {
        foreach ($blueprint->getColumns() as $column) {
            if (isset($column['comment'])) {
                $this->commentColumn($blueprint->getTable(), $column['name'], $column['comment']);
            }
        }
    }
131540
public function make($schema, $table, $mutators = [], $withRelations = true)
    {
        $mapper = $this->factory->makeSchema($schema);

        $blueprint = $mapper->table($table);

        if (Arr::has($this->models, $blueprint->qualifiedTable())) {
            return $this->models[$schema][$table];
        }

        $model = new Model($blueprint, $this->factory, $mutators, $withRelations);

        if ($withRelations) {
            $this->models[$schema][$table] = $model;
        }

        return $model;
    }