src/Database/Migration/Generator/MySqlGenerator.php
public function getTableMigration($output, $new, $old)
    {
        if (!empty($this->options['foreign_keys'])) {
            $output[] = $this->getSetUniqueChecks(0);
            $output[] = $this->getSetForeignKeyCheck(0);
        }

        $output = $this->getTableMigrationNewDatabase($output, $new, $old);
        $output = $this->getTableMigrationNewTables($output, $new, $old);

        if (!empty($this->options['foreign_keys'])) {
            $lines = $this->getForeignKeysMigrations($new, $old);
            $output = $this->appendLines($output, $lines);
        }

        $output = $this->getTableMigrationOldTables($output, $new, $old);

        if (!empty($this->options['foreign_keys'])) {
            $output[] = $this->getSetForeignKeyCheck(1);
            $output[] = $this->getSetUniqueChecks(1);
        }

        return $output;
    }
public function getTableMigration($output, $new, $old)
    {
        if (!empty($this->options['foreign_keys'])) {
            $output[] = $this->getSetUniqueChecks(0);
            $output[] = $this->getSetForeignKeyCheck(0);
        }

        $output = $this->getTableMigrationNewDatabase($output, $new, $old);
        $output = $this->getTableMigrationNewTables($output, $new, $old);

        if (!empty($this->options['foreign_keys'])) {
            $lines = $this->getForeignKeysMigrations($new, $old);
            $output = $this->appendLines($output, $lines);
        }

        $output = $this->getTableMigrationOldTables($output, $new, $old);

        if (!empty($this->options['foreign_keys'])) {
            $output[] = $this->getSetForeignKeyCheck(1);
            $output[] = $this->getSetUniqueChecks(1);
        }

        return $output;
    }
public function getTableMigration ( $ output , $ new , $ old ) { if ( ! empty ( $ this -> options [ 'foreign_keys' ] ) ) { $ output [ ] = $ this -> getSetUniqueChecks ( 0 ) ; $ output [ ] = $ this -> getSetForeignKeyCheck ( 0 ) ; } $ output = $ this -> getTableMigrationNewDatabase ( $ output , $ new , $ old ) ; $ output = $ this -> getTableMigrationNewTables ( $ output , $ new , $ old ) ; if ( ! empty ( $ this -> options [ 'foreign_keys' ] ) ) { $ lines = $ this -> getForeignKeysMigrations ( $ new , $ old ) ; $ output = $ this -> appendLines ( $ output , $ lines ) ; } $ output = $ this -> getTableMigrationOldTables ( $ output , $ new , $ old ) ; if ( ! empty ( $ this -> options [ 'foreign_keys' ] ) ) { $ output [ ] = $ this -> getSetForeignKeyCheck ( 1 ) ; $ output [ ] = $ this -> getSetUniqueChecks ( 1 ) ; } return $ output ; }
Get table migration.

@param string[] $output Output
@param array    $new    New schema
@param array    $old    Old schema

@return array Output
Get table migration .