13 lines
497 B
Bash
13 lines
497 B
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
# Run Prisma database migrations if DATABASE_URL is set and not explicitly skipped
|
|
if [ -n "$DATABASE_URL" ] && [ "$SKIP_DB_MIGRATE" != "true" ]; then
|
|
echo "[CheckFlow] Checking and applying database migrations..."
|
|
if [ -f "./node_modules/prisma/build/index.js" ]; then
|
|
node ./node_modules/prisma/build/index.js migrate deploy --schema=./prisma/schema.prisma || echo "[CheckFlow] Warning: Prisma migration step skipped or encountered non-fatal error."
|
|
fi
|
|
fi
|
|
|
|
exec "$@"
|