mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-12 04:15:30 +00:00
13 lines
360 B
Bash
13 lines
360 B
Bash
|
|
#!/bin/sh
|
||
|
|
|
||
|
|
if [ -z "$DATABASE_URL" ]; then
|
||
|
|
echo "Error: Required environment variable DATABASE_URL is not set. Provide a valid PostgreSQL connection string."
|
||
|
|
exit 1
|
||
|
|
fi
|
||
|
|
|
||
|
|
# Run a Database migration
|
||
|
|
echo -e "\e[34m[Info] Running database migration...\e[0m"
|
||
|
|
yarn workspace @sourcebot/db prisma:migrate:prod
|
||
|
|
|
||
|
|
# Run the command passed to the script
|
||
|
|
exec "$@"
|