mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-13 15:14:49 -06:00
prisma: adjusts for mysql and postgres
This commit is contained in:
parent
678f2c2b5d
commit
9bf17f27f0
2
.gitignore
vendored
2
.gitignore
vendored
@ -43,3 +43,5 @@ lerna-debug.log*
|
||||
.DS_Store
|
||||
*.DS_Store
|
||||
.tool-versions
|
||||
|
||||
/prisma/migrations/*
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user