backdrop-contrib / bee

:bee: Bee is a command line utility for Backdrop CMS. It includes commands that allow developers to interact with Backdrop sites.
GNU General Public License v2.0
16 stars 22 forks source link

Add `sql-query` command #129

Closed bugfolder closed 2 years ago

bugfolder commented 3 years ago

The drush SQL commands would also be really nice. Commands and their drush aliases are:

sql-query (sql:query), most especially; but also

sql-cli (sqlc, sql:cli) sql-connect (sql:connect) sql-create (sql:create) sql-drop (sql:drop) sql-dump (sql:dump) sql-sync

alanmels commented 3 years ago

As promised in today's VUG you can assign this task to me. AltaGrade team will roll out all database-related features. But because of current workload, I think we will need couple weeks to get back to this. If someone would like to take a stab before that, then you are more than welcome.

alanmels commented 3 years ago

Not all the database commands, but three following new commands have been introduced by the PR:

bee sql-drop
bee sql-dump
bee sql-cli
klonos commented 2 years ago

Can we please also add aliases using db- instead of sql-?

I also like db-import (dbim?) and db-export (dbex?) better, as mentioned in #113.

ghost commented 2 years ago

Closed https://github.com/backdrop-contrib/bee/issues/113 as a duplicate of this issue. That one just mentioned:

Lando has db-import and db-export commands. I'd like to add similar commands to bee.

ghost commented 2 years ago

Adding my work-in-progress PR here (so I don't lose it).

ghost commented 2 years ago

The PR adds the following commands:

I figure these would be the most popular, especially considering 'sql' allows you to do lots of the other things (like creating or dropping databases, albeit not as succinctly). I'm not going to add 'sql-sync' (at least in the near future) as this would require a lot of other work in Bee to function.

laryn commented 2 years ago

Just tested with lando bee sql < backdrop-ready.sql and it worked flawlessly. 👍

First time bee user but it feels really clean and fresh! (Tested a few of my favourites without knowing if they'd work -- dl en etc -- and was pleasantly surprised). Good work.

bugfolder commented 2 years ago

Tested bee sql and bee db-export ... and both worked as advertised. 👍

ghost commented 2 years ago

Thanks guys, merged.