Esempio n. 1
0
 public function bootConnection(ConnectionManagerInterface $manager)
 {
     $this->conn = $manager->getConnection('test-bpmn');
     $this->migration = new MigrationManager($this->conn);
 }
Esempio n. 2
0
 public function migrateConnectionUp($connectionName)
 {
     $conn = $this->connectionManager->getConnection($connectionName);
     $migrator = new MigrationManager($conn);
     $config = new MigrationConfig();
     foreach ($this->testKernel->getKomponents() as $komponent) {
         if ($komponent instanceof MigrationProviderInterface) {
             $komponent->loadMigrations($config);
         }
     }
     foreach ($config->getMigrations() as $version => $file) {
         if ($migrator->executeMigrationUp($migrator->instantiateMigration($file))) {
             $this->logger->info('Executed UP migration {version} using connection {conn}', ['version' => $version, 'conn' => (string) $connectionName]);
         }
     }
 }