Skip to content
Michael Woodward edited this page Feb 4, 2017 · 1 revision

Run arbitrary sql against the database

Usage:
    workflow sql [-s "SQL"] [-f path/to/file.sql]

Options:
    -s      SQL to run directly
    -f      Path to file to import

Example:
    workflow sql -s "SELECT * FROM core_config_table;" -f path/to/file.sql

Under the hood this will run the following commands

docker exec -t db-container-name mysql -udbUser -pdbPass db -e "SELECT * FROM core_config_table;"
docker exec -i db-container-name mysql -udbUser -pdbPass db < path/to/file.sql
Clone this wiki locally