Skip to content
This repository has been archived by the owner on Jan 22, 2018. It is now read-only.

Commit

Permalink
Fix unnecessary double space after each 'create table' in schema.sql
Browse files Browse the repository at this point in the history
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;'
  • Loading branch information
sstoyanov7 authored and hkdobrev committed Nov 14, 2017
1 parent bb89537 commit 73e5f67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/Task/Db/Structure/Dump.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down

0 comments on commit 73e5f67

Please sign in to comment.