fix migration issues
This commit is contained in:
@@ -5,6 +5,12 @@ set -e
|
|||||||
if [ ! -f "/app/prisma/schema.prisma" ]; then
|
if [ ! -f "/app/prisma/schema.prisma" ]; then
|
||||||
echo "Mount is empty. Hydrating /app/prisma..."
|
echo "Mount is empty. Hydrating /app/prisma..."
|
||||||
cp -R /app/prisma_template/. /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
|
fi
|
||||||
|
|
||||||
# 2. Fix permissions unconditionally (Running as root)
|
# 2. Fix permissions unconditionally (Running as root)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "backend",
|
"name": "backend",
|
||||||
"version": "0.1.5",
|
"version": "0.1.6",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "frontend",
|
"name": "frontend",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.1.5",
|
"version": "0.1.6",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
Reference in New Issue
Block a user