Skip to content

Commit

Permalink
Added logging
Browse files Browse the repository at this point in the history
  • Loading branch information
tjoost committed Oct 31, 2024
1 parent 4bc759f commit b64ccc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Logic/Database/Migrator/DatabaseMigrationBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ private function createMigrationFile(): string
$debugMessage = date("H:i:s:u") . " migration ignore tables: " . $ignoredTables . "\n";
$exitCode = shell_exec("bash " . $this->_path . ConstantsTestStage::BACKUP_LOCAL_DATABASE . " -i'".$ignoredTables."' -u'".$this->_testDatabaseConfig->getUsername()."' -p'".$this->_testDatabaseConfig->getPassword()."' -h'".$this->_testDatabaseConfig->getServer()."' -P'".$this->_testDatabaseConfig->getPort()."' -d'".$this->_testDatabaseConfig->getName()."' -t'" . $this->_path . ConstantsTestStage::DATABASE_MIGRATION_DIRECTORY . "' 2>&1; echo $?");
if($exitCode != 0 && $exitCode) {
throw new Exception("Failed to create local database backup. Output: $exitCode");
throw new Exception("Failed to create local database backup using script: " . $this->_path . ConstantsTestStage::BACKUP_LOCAL_DATABASE . ". Output: $exitCode");
} else {
$debugMessage .= date("H:i:s:u") . " backuped local database using script: " . $this->_path . ConstantsTestStage::BACKUP_LOCAL_DATABASE . " \n";
}
Expand Down

0 comments on commit b64ccc3

Please sign in to comment.