File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -193,6 +193,14 @@ Commands:
193193 Use `$(itkdev-docker-compose sql:connect)` to open the
194194 database cli.
195195
196+ Execute a SQL query from the command line:
197+
198+ $(itkdev-docker-compose sql:connect) --table <<< 'SHOW TABLES'
199+
200+ Run a SQL script:
201+
202+ $(itkdev-docker-compose sql:connect) < query.sql
203+
196204 sql:log
197205 Log SQL queries sent to database.
198206
609617 ;;
610618
611619 sql:connect)
612- address=$( docker_compose port mariadb 3306)
613- host=$( echo $address | cut -d: -f1)
614- port=$( echo $address | cut -d: -f2)
615- echo mysql --host=$host --port=$port --user=db --password=db db
620+ db_service=mariadb
621+ echo docker compose exec --no-TTY $db_service mysql --user=db --password=db db
616622 ;;
617623
618624 sql:open)
You can’t perform that action at this time.
0 commit comments