From 85c5d54a12c050ffe29fe33316cdab3f7c722557 Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Sat, 21 Feb 2026 14:48:22 +0100 Subject: [PATCH] fix(pangolin): restore config before db migration, use drizzle-kit push (#12130) npm run db:push ran drizzle migrate (CREATE TABLE) on an empty directory before the config backup was restored, creating a fresh DB that got immediately overwritten by the old backup. The old DB was missing new columns like resources.postAuthPath (added in 1.15.4). Replace with drizzle-kit push after config restore, which introspects the existing DB and applies schema diffs (ALTER TABLE) instead. Ref: #12068 --- ct/pangolin.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ct/pangolin.sh b/ct/pangolin.sh index 24f2b4651..5379a5299 100644 --- a/ct/pangolin.sh +++ b/ct/pangolin.sh @@ -51,7 +51,6 @@ function update_script() { $STD npm run db:generate $STD npm run build $STD npm run build:cli - $STD npm run db:push cp -R .next/standalone ./ chmod +x ./dist/cli.mjs cp server/db/names.json ./dist/names.json @@ -64,6 +63,11 @@ function update_script() { rm -f /opt/pangolin_config_backup.tar.gz msg_ok "Restored config" + msg_info "Running database migrations" + cd /opt/pangolin + ENVIRONMENT=prod $STD npx drizzle-kit push --config drizzle.sqlite.config.ts + msg_ok "Ran database migrations" + msg_info "Updating Badger plugin version" BADGER_VERSION=$(get_latest_github_release "fosrl/badger" "false") sed -i "s/version: \"v[0-9.]*\"/version: \"$BADGER_VERSION\"/g" /opt/pangolin/config/traefik/traefik_config.yml