2
0

🏗️ Add compatibility with different prisma clients

This commit is contained in:
Baptiste Arnaud
2023-02-08 10:51:32 +01:00
parent c879c6f83a
commit caf54321ec
65 changed files with 942 additions and 211 deletions

View File

@@ -2,11 +2,18 @@
ENVSH_ENV=./apps/builder/.env.production ENVSH_OUTPUT=./apps/builder/public/__env.js bash env.sh
./node_modules/.bin/prisma generate;
if [[ $DATABASE_URL == postgresql://* ]]; then
./node_modules/.bin/prisma generate --schema=packages/db/postgresql/schema.prisma;
else
./node_modules/.bin/prisma generate --schema=packages/db/mysql/schema.prisma;
fi
echo 'Waiting 5s for db to be ready...';
sleep 5;
./node_modules/.bin/prisma migrate deploy;
if [[ $DATABASE_URL == postgresql://* ]]; then
./node_modules/.bin/prisma migrate deploy --schema=packages/db/postgresql/schema.prisma;
fi
node apps/builder/server.js;