@@ -43,12 +43,12 @@ public function __construct(public iDatabase $database,
43
43
public function __invoke () : void {
44
44
$ dumpfile = $ this ->dumpfile ->getFilename ();
45
45
46
- $ ignoredTableString = implode (' ' , array_map (static fn (string $ table ) => sprintf ('--ignore-table %s ' , $ table ), $ this ->database ->getTablesToIgnore ()));
46
+ $ ignoredTableString = implode (' ' , array_map (static fn (string $ table ) => sprintf ('--ignore-table "%s" ' , $ table ), $ this ->database ->getTablesToIgnore ()));
47
47
48
48
$ name = $ this ->database ->getName ();
49
49
50
- $ baseCommand = sprintf ('mysqldump --user=%s --password=%s --host=%s --port=%d --comments=false --disable-keys --no-autocommit --single-transaction ' , $ this ->database ->getUser (), $ this ->database ->getPassword (), $ this ->database ->getHost (), $ this ->database ->getPort ());
51
- $ this ->deployerFunctions ->run (sprintf ('%s --add-drop-table --routines --no-data %s > %s ' , $ baseCommand , $ name , $ dumpfile ));
52
- $ this ->deployerFunctions ->run (sprintf ('%s --no-create-info --extended-insert %s %s >> %s ' , $ baseCommand , $ ignoredTableString , $ name , $ dumpfile ));
50
+ $ baseCommand = sprintf ('mysqldump --user="%s" --password="%s" --host="%s" --port=%d --comments=false --disable-keys --no-autocommit --single-transaction ' , $ this ->database ->getUser (), $ this ->database ->getPassword (), $ this ->database ->getHost (), $ this ->database ->getPort ());
51
+ $ this ->deployerFunctions ->run (sprintf ('%s --add-drop-table --routines --no-data "%s" > "%s" ' , $ baseCommand , $ name , $ dumpfile ));
52
+ $ this ->deployerFunctions ->run (sprintf ('%s --no-create-info --extended-insert %s "%s" >> "%s" ' , $ baseCommand , $ ignoredTableString , $ name , $ dumpfile ));
53
53
}
54
54
}
0 commit comments