parsaaghayi-backend/vendor/laravel/sail/database/mariadb/create-testing-database.sh
parsa aghaei 640bd67556
Some checks failed
Deploy Backend / deploy (push) Failing after 1m13s
chore: commit vendor for offline build
2026-06-28 16:47:17 +03:30

12 lines
319 B
Bash

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