parsaaghayi-backend/vendor/laravel/sail/database/mysql/create-testing-database.sh
DevOps c9a688e80d
Some checks failed
Deploy Backend / deploy (push) Has been cancelled
chore: commit vendor directory for fully offline builds
2026-06-28 18:08:40 +00:00

12 lines
297 B
Bash

#!/usr/bin/env bash
mysql --user=root --password="$MYSQL_ROOT_PASSWORD" <<-EOSQL
CREATE DATABASE IF NOT EXISTS testing;
EOSQL
if [ -n "$MYSQL_USER" ]; then
mysql --user=root --password="$MYSQL_ROOT_PASSWORD" <<-EOSQL
GRANT ALL PRIVILEGES ON \`testing%\`.* TO '$MYSQL_USER'@'%';
EOSQL
fi