opensupports/tests/truncate_db.sh
2022-05-16 17:32:50 -03:00

10 lines
318 B
Bash
Executable File

#!/bin/bash
# DELETE ALL TABLES
service mysql start;
TABLES=$(mysql --host ${MYSQL_HOST} --port ${MYSQL_PORT} -u root development -e "SHOW TABLES IN development;" | awk '{ print $1}' | grep -v '^Tables')
for t in $TABLES
do
mysql --host ${MYSQL_HOST} --port ${MYSQL_PORT} -u root development -e "DROP TABLE $t"
done