diff --git a/scripts/local/backup_local_database.sh b/scripts/local/backup_local_database.sh index 2cb472f..9e540c7 100644 --- a/scripts/local/backup_local_database.sh +++ b/scripts/local/backup_local_database.sh @@ -26,8 +26,8 @@ chmod -R 0777 "$to_path" BACKUP_TEMP_FILE="$to_path/database_migration.sql" -mysqldump --no-tablespaces "$ignoredTables" -u "$user" -p"$password" -h"$host" -P"$port" "$database" > "$BACKUP_TEMP_FILE" +mysqldump --no-tablespaces -u "$user" -p"$password" -h"$host" -P"$port" $ignoredTables "$database" > "$BACKUP_TEMP_FILE" # Das hier ist der exit Code vom vorherigen Befehl exitCode=$? -exit $exitCode \ No newline at end of file +exit $exitCode diff --git a/src/Logic/Database/Migrator/DatabaseMigrationBuilder.php b/src/Logic/Database/Migrator/DatabaseMigrationBuilder.php index 21436b2..62d67e6 100644 --- a/src/Logic/Database/Migrator/DatabaseMigrationBuilder.php +++ b/src/Logic/Database/Migrator/DatabaseMigrationBuilder.php @@ -73,7 +73,7 @@ public function buildAndCopy(): string */ private function createMigrationFile(): string { - $ignoredTables = $this->getIgnoreTablesAsString(); + $ignoredTables = trim($this->getIgnoreTablesAsString()); $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"); if($exitCode != 0) {