From 73e5f67c32646a77228eec18c8fc1f9b058f8a6f Mon Sep 17 00:00:00 2001 From: Svetlozar Stoyanov Date: Mon, 13 Nov 2017 19:45:13 +0200 Subject: [PATCH] Fix unnecessary double space after each 'create table' in schema.sql when ./minion db:structure:dump is executed. Example of spaces before and after the fix between DEFAULT and CHARSET: - Before 'CREATE TABLE foo(...) ENGINE=InnoDB DEFAULT CHARSET=utf8;' - After 'CREATE TABLE foo(...) ENGINE=InnoDB DEFAULT CHARSET=utf8;' --- classes/Task/Db/Structure/Dump.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/Task/Db/Structure/Dump.php b/classes/Task/Db/Structure/Dump.php index dc3225d..0615300 100644 --- a/classes/Task/Db/Structure/Dump.php +++ b/classes/Task/Db/Structure/Dump.php @@ -27,7 +27,7 @@ protected function _execute(array $options) $file = $options['file'] ? $options['file'] : Kohana::$config->load("migrations.path").DIRECTORY_SEPARATOR.'schema.sql'; - $command = strtr("mysqldump -u:username :password -h :hostname --skip-comments --add-drop-database --add-drop-table --no-data :database | sed 's/AUTO_INCREMENT=[0-9]*\b//' > :file ", array( + $command = strtr("mysqldump -u:username :password -h :hostname --skip-comments --add-drop-database --add-drop-table --no-data :database | sed 's/ AUTO_INCREMENT=[0-9]*\b//' > :file ", array( ':username' => $db['username'], ':password' => $db['password'] ? '-p'.$db['password'] : '', ':database' => $db['database'],