say("Hello, " . implode(', ', $world)); } function migrate($client, $action){ $this->includeCientConfig($client); $this->say("DB Migrating " . $action . " for ". $client); $migrationManager = new \Classes\Migration\MigrationManager(); $res = $migrationManager->runMigration($action); $this->say("DB Migrating Result : " . print_r($res, true)); } function migrateAll($client){ $this->includeCientConfig($client); $this->say("Run all pending migrations " . " for ". $client); $migrationManager = new \Classes\Migration\MigrationManager(); $migrationManager->queueMigrations(); $migrations = $migrationManager->getPendingMigrations(); foreach ($migrations as $migration) { $res = $migrationManager->runMigrationUp($migration); if(empty($res)){ $this->yell("Migration not found", 40, 'yellow'); }elseif($res->status != 'Up'){ $this->yell("Migration error ".$res->file." (".$res->status.")", 40, 'red'); }else{ $this->yell("Migration OK ".$res->file." (".$res->status.")"); } } $this->say("DB Migration Completed !!!"); } }