From b64ccc3c598ad2b77bce3ea7c127e580d1970b46 Mon Sep 17 00:00:00 2001 From: tjoost Date: Thu, 31 Oct 2024 11:44:35 +0100 Subject: [PATCH] Added logging --- src/Logic/Database/Migrator/DatabaseMigrationBuilder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Logic/Database/Migrator/DatabaseMigrationBuilder.php b/src/Logic/Database/Migrator/DatabaseMigrationBuilder.php index 028116a..a1c278d 100644 --- a/src/Logic/Database/Migrator/DatabaseMigrationBuilder.php +++ b/src/Logic/Database/Migrator/DatabaseMigrationBuilder.php @@ -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"; }