Skip to content

Commit

Permalink
Fixed ignore tables error
Browse files Browse the repository at this point in the history
  • Loading branch information
tjoost committed Oct 25, 2024
1 parent 1fee67b commit 2296137
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions scripts/local/backup_local_database.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
exit $exitCode
2 changes: 1 addition & 1 deletion src/Logic/Database/Migrator/DatabaseMigrationBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 2296137

Please sign in to comment.