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.
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user