Skip to content

Commit

Permalink
Fix #3417. sql-sync dump filename not automatically generated (#3418)
Browse files Browse the repository at this point in the history
* Fix sql-sync dump filename.

* Disable opcache as it doesn't help on the CLI.
  • Loading branch information
weitzman authored Feb 27, 2018
1 parent aa638d2 commit 997f8d3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .circleci/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ echo 'mbstring.http_output = pass' >> $HOME/php.ini
echo 'memory_limit = -1' >> $HOME/php.ini
echo 'sendmail_path = /bin/true' >> $HOME/php.ini
echo 'date.timezone = "UTC"' >> $HOME/php.ini
echo 'opcache.enable_cli = 0' >> $HOME/php.ini

# Copy our php.ini configuration to the active php.ini file
# We can't use `php -r 'print php_ini_loaded_file();` when there is no php.ini
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/sql/SqlCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public function query($query = '', $options = ['result-file' => null, 'file' =>
* @notes
* createdb is used by sql-sync, since including the DROP TABLE statements interfere with the import when the database is created.
*/
public function dump($options = ['result-file' => null, 'create-db' => false, 'data-only' => false, 'ordered-dump' => false, 'gzip' => false, 'extra' => self::REQ, 'extra-dump' => self::REQ])
public function dump($options = ['result-file' => self::REQ, 'create-db' => false, 'data-only' => false, 'ordered-dump' => false, 'gzip' => false, 'extra' => self::REQ, 'extra-dump' => self::REQ])
{
$sql = SqlBase::create($options);
if ($sql->dump() === false) {
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/sql/SqlSyncCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public function dump($options, $global_options, $sourceRecord, $backend_options)
{
$dump_options = $global_options + [
'gzip' => true,
'result-file' => $options['source-dump'] ?: true,
'result-file' => $options['source-dump'] ?: 'auto',
];
if (!$options['no-dump']) {
$this->logger()->notice(dt('Starting to dump database on source.'));
Expand Down

0 comments on commit 997f8d3

Please sign in to comment.