fix migration issues

This commit is contained in:
Zimeng Xiong
2025-11-24 14:53:17 -08:00
parent c53dc010de
commit f20d48fea2
4 changed files with 9 additions and 3 deletions
+6
View File
@@ -5,6 +5,12 @@ set -e
if [ ! -f "/app/prisma/schema.prisma" ]; then
echo "Mount is empty. Hydrating /app/prisma..."
cp -R /app/prisma_template/. /app/prisma/
else
# Volume exists but may be missing new migrations from an upgrade
# Always sync schema and migrations from template to ensure upgrades work
echo "Syncing schema and migrations from template..."
cp /app/prisma_template/schema.prisma /app/prisma/schema.prisma
cp -R /app/prisma_template/migrations/. /app/prisma/migrations/
fi
# 2. Fix permissions unconditionally (Running as root)