src/Database/Migration/Adapter/PdoAdapter.php
public function setConnection(\PDO $connection)
    {
        $this->connection = $connection;

        // Create the schema table if it doesn't already exist
        if (!$this->hasSchemaTable()) {
            $this->createSchemaTable();
        } else {
            $table = new Table($this->getSchemaTableName(), [], $this);
            if (!$table->hasColumn('migration_name')) {
                $table
                    ->addColumn('migration_name', 'string',
                        ['limit' => 100, 'after' => 'version', 'default' => null, 'null' => true]
                    )
                    ->save();
            }
            if (!$table->hasColumn('breakpoint')) {
                $table
                    ->addColumn('breakpoint', 'boolean', ['default' => false])
                    ->save();
            }
        }

        return $this;
    }
public function setConnection(\PDO $connection)
    {
        $this->connection = $connection;

        // Create the schema table if it doesn't already exist
        if (!$this->hasSchemaTable()) {
            $this->createSchemaTable();
        } else {
            $table = new Table($this->getSchemaTableName(), [], $this);
            if (!$table->hasColumn('migration_name')) {
                $table
                    ->addColumn('migration_name', 'string',
                        ['limit' => 100, 'after' => 'version', 'default' => null, 'null' => true]
                    )
                    ->save();
            }
            if (!$table->hasColumn('breakpoint')) {
                $table
                    ->addColumn('breakpoint', 'boolean', ['default' => false])
                    ->save();
            }
        }

        return $this;
    }
public function setConnection ( \ PDO $ connection ) { $ this -> connection = $ connection ; // Create the schema table if it doesn't already exist if ( ! $ this -> hasSchemaTable ( ) ) { $ this -> createSchemaTable ( ) ; } else { $ table = new Table ( $ this -> getSchemaTableName ( ) , [ ] , $ this ) ; if ( ! $ table -> hasColumn ( 'migration_name' ) ) { $ table -> addColumn ( 'migration_name' , 'string' , [ 'limit' => 100 , 'after' => 'version' , 'default' => null , 'null' => true ] ) -> save ( ) ; } if ( ! $ table -> hasColumn ( 'breakpoint' ) ) { $ table -> addColumn ( 'breakpoint' , 'boolean' , [ 'default' => false ] ) -> save ( ) ; } } return $ this ; }
Sets the database connection.

@param \PDO $connection Connection

@return AdapterInterface
Sets the database connection .