Closed (fixed)
Project:
Drush
Version:
All-versions-4.2
Component:
SQL
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
31 May 2011 at 08:51 UTC
Updated:
15 Jun 2011 at 13:51 UTC
it would be very much appreciated, if you could pass some arguments to the "drush sql-cli" command.
for example:
drush sql-cli -f < myfile.cmd
currently this is not possible, but i guess it won't be that hard?
thanks
kiwi
Comments
Comment #1
greg.1.anderson commentedYour request is a duplicate of #880154: sql-query could take a --file option.. It can also be done today via:
`drush sql-connect` < myfile.cmdNote the use of backticks to execute the output from the sql-connect command.
Comment #2
neurovation.kiwi commentedwell, looks like i didn't explain correctly what i wanted - my bad.
it would be great if you could use all options that mysql allows and make a "options-passthrough" from drush to mysql. so if i may make some analogy (assuming drush would be a rather simple unix shell script):
would transfer to
so in the examle of my previous post the emphasis is on the -r option - the inputfile is already possible.
is it now clearer what i wanted to achive?
thanks
PS: just realized that this might be a wont-fix cause it would contradict the abstraction level of the db that is actually used?
Comment #3
greg.1.anderson commentedI don't see the utility of passing in user / host / database; if you want to change everything around, just call mysql directly. The very utility of sql-cli is that it provides these options for you. If you have a solid use case to merging options in with the ones drush provides, maybe we should join this request with the similar issue #518184: Allow Users To Set myqldump Arguments In drushrc.php (for drush sql dump). ("Patches welcome." :) )