mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-18 11:22:21 -06:00
prisma: adjusts for mysql and postgres
This commit is contained in:
@@ -10,7 +10,9 @@ 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 --migrations ./prisma/migrations/$DATABASE_PROVIDER
|
||||
rm -rf ./prisma/migrations
|
||||
cp -r ./prisma/$DATABASE_PROVIDER-migrations ./prisma/migrations
|
||||
npx prisma migrate deploy --schema ./prisma/$DATABASE_PROVIDER-schema.prisma
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Migration failed"
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user