getUpgradeScripts() public method

Each data source has it's own migration timestamp, we use the data source ID to get the migration timestamp and filter the migration script.
public getUpgradeScripts ( Connection $conn, BaseDriver $driver )
$conn LazyRecord\Connection
$driver SQLBuilder\Driver\BaseDriver
 public function execute()
 {
     $dsId = $this->getCurrentDataSourceId();
     $runner = new MigrationRunner($dsId);
     $runner->load('db/migrations');
     $scripts = $runner->getUpgradeScripts($dsId);
     $count = count($scripts);
     $this->logger->info("Found " . $count . ($count > 1 ? ' migration scripts' : ' migration script') . ' to be executed.');
     foreach ($scripts as $script) {
         $this->logger->info('- ' . $script, 1);
     }
 }
 public function execute()
 {
     $dsId = $this->getCurrentDataSourceId();
     $connectionManager = ConnectionManager::getInstance();
     $conn = $connectionManager->getConnection($dsId);
     $driver = $connectionManager->getQueryDriver($dsId);
     $runner = new MigrationRunner($this->logger, $dsId);
     $runner->load($this->options->{'script-dir'} ?: 'db/migrations');
     $scripts = $runner->getUpgradeScripts($conn, $driver);
     $count = count($scripts);
     $this->logger->info('Found ' . $count . ($count > 1 ? ' migration scripts' : ' migration script') . ' to be executed.');
     foreach ($scripts as $script) {
         $this->logger->info('- ' . $script, 1);
     }
 }