Compare commits

...

2 Commits

Author SHA1 Message Date
1de1c9dcde remove migrations 2026-04-11 21:57:48 -05:00
2f94039f02 remove migrations 2026-04-11 21:57:35 -05:00
2 changed files with 8 additions and 10 deletions

View File

@@ -90,8 +90,6 @@ COPY --from=builder /app/node_modules/.pnpm/@prisma+client@5.22.0_prisma@5.22.0/
COPY --from=builder /app/node_modules/.pnpm/@prisma+client@5.22.0_prisma@5.22.0/node_modules/.prisma/client/libquery_engine-debian-openssl-3.0.x.so.node /app/apps/admin/.next/server/
COPY --from=builder /app/node_modules/.pnpm/@prisma+client@5.22.0_prisma@5.22.0/node_modules/.prisma/client/schema.prisma /app/apps/admin/.next/server/
COPY --from=builder /app/packages/shared/prisma/migrations ./packages/shared/prisma/migrations
# Install Prisma CLI globally for runtime migrations
RUN npm install -g prisma@5.22.0

View File

@@ -43,14 +43,14 @@ run_with_retries() {
}
# Prefer migration-based deploys. Fall back to db push when no migrations exist yet.
set -- "$MIGRATIONS_DIR"/*/migration.sql
if [ -f "$1" ]; then
echo "Applying Prisma migrations..."
run_with_retries npx prisma migrate deploy --schema=./packages/shared/prisma/schema.prisma
else
echo "No Prisma migrations found. Syncing schema with db push..."
run_with_retries npx prisma db push --skip-generate --schema=./packages/shared/prisma/schema.prisma
fi
# set -- "$MIGRATIONS_DIR"/*/migration.sql
# if [ -f "$1" ]; then
# echo "Applying Prisma migrations..."
# run_with_retries npx prisma migrate deploy --schema=./packages/shared/prisma/schema.prisma
# else
# echo "No Prisma migrations found. Syncing schema with db push..."
# run_with_retries npx prisma db push --skip-generate --schema=./packages/shared/prisma/schema.prisma
# fi
echo "Starting Next.js server..."
exec node apps/admin/server.js