From 628b2925e3805b57c0f014a8707e398d8d363281 Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Thu, 26 Mar 2026 10:12:08 +0100 Subject: [PATCH] Fix Baserow migrations and LobeHub copy Set PYTHONPATH and run manage.py migrate for Baserow so backend, premium, and enterprise source packages are discovered during migrations. In the LobeHub installer, copy all files from scripts/migrateServerDB into the .next/standalone directory (instead of only docker.cjs) so required migration and helper files are included. --- ct/baserow.sh | 3 ++- install/lobehub-install.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ct/baserow.sh b/ct/baserow.sh index 75f681d7..6241af3c 100644 --- a/ct/baserow.sh +++ b/ct/baserow.sh @@ -59,7 +59,8 @@ function update_script() { msg_info "Running Migrations" cd /opt/baserow/backend set -a && source /opt/baserow/.env && set +a - $STD /opt/baserow/backend/.venv/bin/python -m baserow migrate + export PYTHONPATH="/opt/baserow/backend/src:/opt/baserow/premium/backend/src:/opt/baserow/enterprise/backend/src" + $STD /opt/baserow/backend/.venv/bin/python src/baserow/manage.py migrate msg_ok "Ran Migrations" msg_info "Starting Services" diff --git a/install/lobehub-install.sh b/install/lobehub-install.sh index 2a2e14d8..e46ab86b 100644 --- a/install/lobehub-install.sh +++ b/install/lobehub-install.sh @@ -57,7 +57,7 @@ EOF msg_ok "Configured Application" msg_info "Setting Up Standalone" -cp /opt/lobehub/scripts/migrateServerDB/docker.cjs /opt/lobehub/.next/standalone/docker.cjs +cp -r /opt/lobehub/scripts/migrateServerDB/* /opt/lobehub/.next/standalone/ cp /opt/lobehub/scripts/serverLauncher/startServer.js /opt/lobehub/.next/standalone/startServer.js cp -r /opt/lobehub/packages/database/migrations /opt/lobehub/.next/standalone/migrations msg_ok "Set Up Standalone"