Skip to content

Commit 4e1e9a4

Browse files
committed
Fixes drush-ops#6319. Update docs: import SQL dump using sql:connect not sql:cli
1 parent a511c02 commit 4e1e9a4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Commands/sql/SqlCommands.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ public function drop($options = ['extra' => self::REQ]): void
125125

126126
/**
127127
* Open a SQL command-line interface using Drupal's credentials.
128+
*
129+
* To import an SQL dump, it is more efficient to use sql:connect than sql:cli. See Examples below.
128130
*/
129131
#[CLI\Command(name: self::CLI, aliases: ['sqlc', 'sql-cli'])]
130132
#[CLI\Option(name: 'extra', description: 'Add custom options to the connect string (e.g. --extra=--skip-column-names)')]
@@ -133,7 +135,8 @@ public function drop($options = ['extra' => self::REQ]): void
133135
#[CLI\Topics(topics: [DocsCommands::POLICY])]
134136
#[CLI\Usage(name: 'drush sql:cli', description: 'Open a SQL command-line interface using Drupal\'s credentials.')]
135137
#[CLI\Usage(name: 'drush sql:cli --extra=--progress-reports', description: 'Open a SQL CLI and skip reading table information.')]
136-
#[CLI\Usage(name: 'drush sql:cli < example.sql', description: 'Import sql statements from a file into the current database.')]
138+
#[CLI\Usage(name: '$(drush sql:connect) < example.sql', description: 'Bash: Import SQL statements from a file into the current database.')]
139+
#[CLI\Usage(name: 'eval (drush sql:connect) < example.sql', description: 'Fish: Import SQL statements from a file into the current database.')]
137140
public function cli(InputInterface $input, $options = ['extra' => self::REQ]): void
138141
{
139142
$sql = SqlBase::create($options);

0 commit comments

Comments
 (0)