In my last patch (http://drupal.org/node/438828), I forgot to support --structure-tables-key (just missed a block of code). This patch rectifies that oversight. It also fixes the verbose flag (now passes '-q' for quiet and nothing for verbose) and [bonus feature] adds a new command "drush sql tables" that lists all tables in the database. Finally, a check is also added to prevent attempts to copy a Postgres database into a Mysql database (or visa-versa) via "drush sql load".
- Greg
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | drush-HEAD-2009_04_22.patch | 5.33 KB | greg.1.anderson |
| drush-HEAD-2009_04_21.patch | 6.7 KB | greg.1.anderson |
Comments
Comment #1
moshe weitzman commentedThanks.
I don't really like multi-purpose patches though. Can we just add structure-tables support? I'll also take our -q change if you think it makes sense. Note that drush already has -q support so maybe we should expect user to specify that.
sql tables might make sense if we add your smart merging. i have to look into that. until we do, lets expect admins to use sql query command.
that check for scheme in sql load is too defensive IMO. it will save one user in a million. not worth the extra code.
Comment #2
greg.1.anderson commentedI have included a new patch that is identical to the previous, but backs out the "drush sql tables" command and the schema check in "drush sql load". I'll resubmit the tables command when merging is working, and you can decide then whether that belongs in "drush sql" (my preference) or in a separate drush module. I backed out the schema check with some reluctance; it's only three lines of code, and in my mind the code is more correct with the check.
I think that the -q change makes sense the way I put it in; mysql is quiet by default and verbose with -v, whereas psql is verbose by default and quiet with -q. The way I patched it normalizes the verbosity levels between mysql and drush.
Let me know if you want further modifications. (Point of procedure: do you want me to set the status back to "needs review" every time I submit a patch that I think might be "done"? I've been leaving the status alone after you touch it.)
Thanks,
- Greg
Comment #3
moshe weitzman commentedCommitted. Thanks.
You should set status back to 'needs review' every time. Some other relevant questions are documented at http://drupal.org/patch.
Comment #4
moshe weitzman commentedOne more thing - when you create patch, it should be from within the relevant contrib module at its root dir. So yours should be one level deeper. Thanks.
Comment #5
greg.1.anderson commentedGreat, thanks. I'll adjust my makepatch script appropriately.
Comment #6
greg.1.anderson commented