mirror of
https://github.com/kyantech/Palmr.git
synced 2025-10-22 22:02:00 +00:00
fix: update database schema push command to include force-reset option
- Modified the database schema push command in server-start.sh to include the --force-reset flag for both root and non-root users. - This change ensures that the database schema is reset and applied correctly, improving the initialization process for the application.
This commit is contained in:
@@ -41,9 +41,9 @@ if [ ! -f "/app/server/prisma/palmr.db" ]; then
|
||||
|
||||
echo "🗄️ Creating database schema..."
|
||||
if [ "$(id -u)" = "0" ]; then
|
||||
su-exec $TARGET_UID:$TARGET_GID npx prisma db push --schema=./prisma/schema.prisma --skip-generate
|
||||
su-exec $TARGET_UID:$TARGET_GID npx prisma db push --schema=./prisma/schema.prisma --skip-generate --force-reset
|
||||
else
|
||||
npx prisma db push --schema=./prisma/schema.prisma --skip-generate
|
||||
npx prisma db push --schema=./prisma/schema.prisma --skip-generate --force-reset
|
||||
fi
|
||||
|
||||
# Run seed script from application directory (where node_modules is) - as target user
|
||||
@@ -60,9 +60,9 @@ else
|
||||
|
||||
echo "🔧 Checking for schema updates..."
|
||||
if [ "$(id -u)" = "0" ]; then
|
||||
su-exec $TARGET_UID:$TARGET_GID npx prisma db push --schema=./prisma/schema.prisma --skip-generate
|
||||
su-exec $TARGET_UID:$TARGET_GID npx prisma db push --schema=./prisma/schema.prisma --skip-generate --force-reset
|
||||
else
|
||||
npx prisma db push --schema=./prisma/schema.prisma --skip-generate
|
||||
npx prisma db push --schema=./prisma/schema.prisma --skip-generate --force-reset
|
||||
fi
|
||||
|
||||
echo "🔍 Checking if new tables need seeding..."
|
||||
|
Reference in New Issue
Block a user