src/Itkg/Core/Command/DatabaseUpdate/Setup.php
public function createMigration($script, $rollbackScript)
    {
        $this->releaseChecker->checkScript($script, $rollbackScript);

        if ($this->rollbackedFirst) {
            /* When rollback is needed first we invert script & rollback script */
            list($rollbackScript, $script) = array($script, $rollbackScript);
        }

        $this->migrations[] = $this->migrationFactory->createMigration(
            $this->loader->load($script)->getQueries(),
            $this->loader->load($rollbackScript)->getQueries()
        );

        return $this;
    }
public function createMigration($script, $rollbackScript)
    {
        $this->releaseChecker->checkScript($script, $rollbackScript);

        if ($this->rollbackedFirst) {
            /* When rollback is needed first we invert script & rollback script */
            list($rollbackScript, $script) = array($script, $rollbackScript);
        }

        $this->migrations[] = $this->migrationFactory->createMigration(
            $this->loader->load($script)->getQueries(),
            $this->loader->load($rollbackScript)->getQueries()
        );

        return $this;
    }
public function createMigration ( $ script , $ rollbackScript ) { $ this -> releaseChecker -> checkScript ( $ script , $ rollbackScript ) ; if ( $ this -> rollbackedFirst ) { /* When rollback is needed first we invert script & rollback script */ list ( $ rollbackScript , $ script ) = array ( $ script , $ rollbackScript ) ; } $ this -> migrations [ ] = $ this -> migrationFactory -> createMigration ( $ this -> loader -> load ( $ script ) -> getQueries ( ) , $ this -> loader -> load ( $ rollbackScript ) -> getQueries ( ) ) ; return $ this ; }
Create a migration from SQL script & rollback script

@param $script
@param $rollbackScript
@throws \InvalidArgumentException

@return $this
Create a migration from SQL script & rollback script