prisma: adjusts for mysql and postgres

This commit is contained in:
Davidson Gomes
2024-08-09 07:58:33 -03:00
parent 840f9c6f57
commit 678f2c2b5d
33 changed files with 842 additions and 48 deletions

View File

@@ -10,7 +10,7 @@ if [[ "$DATABASE_PROVIDER" == "postgresql" || "$DATABASE_PROVIDER" == "mysql" ]]
export DATABASE_URL
echo "Deploying migrations for $DATABASE_PROVIDER"
echo "Database URL: $DATABASE_URL"
npx prisma migrate deploy --schema ./prisma/$DATABASE_PROVIDER-schema.prisma
npx prisma migrate deploy --schema ./prisma/$DATABASE_PROVIDER-schema.prisma --migrations ./prisma/migrations/$DATABASE_PROVIDER
if [ $? -ne 0 ]; then
echo "Migration failed"
exit 1