From f20d48fea21bf14f5e5b2f26735396d357c633b7 Mon Sep 17 00:00:00 2001 From: Zimeng Xiong Date: Mon, 24 Nov 2025 14:53:17 -0800 Subject: [PATCH] fix migration issues --- VERSION | 2 +- backend/docker-entrypoint.sh | 6 ++++++ backend/package.json | 2 +- frontend/package.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index def9a01..a192233 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.5 \ No newline at end of file +0.1.6 \ No newline at end of file diff --git a/backend/docker-entrypoint.sh b/backend/docker-entrypoint.sh index d1a311a..07889f6 100644 --- a/backend/docker-entrypoint.sh +++ b/backend/docker-entrypoint.sh @@ -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) diff --git a/backend/package.json b/backend/package.json index 384c855..86dd00d 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "backend", - "version": "0.1.5", + "version": "0.1.6", "description": "", "main": "index.js", "scripts": { diff --git a/frontend/package.json b/frontend/package.json index 987be3c..ec9dd0e 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,7 +1,7 @@ { "name": "frontend", "private": true, - "version": "0.1.5", + "version": "0.1.6", "type": "module", "scripts": { "dev": "vite",