mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-07-10 16:12:13 +02:00
Block Pangolin SQLite upgrades
Update the Pangolin CT upgrade path to fail fast when PostgreSQL is not installed. The script now explains that upgrades to Pangolin 1.20.0+ require PostgreSQL and that SQLite data cannot be migrated automatically.
This commit is contained in:
+7
-8
@@ -33,14 +33,13 @@ function update_script() {
|
||||
|
||||
ensure_dependencies build-essential python3
|
||||
|
||||
CURRENT_VERSION=$(grep -oP '(?<="version": ")[^"]+' /opt/pangolin/package.json 2>/dev/null || echo "0.0.0")
|
||||
if [[ $(echo -e "$CURRENT_VERSION\n1.20.0" | sort -V | head -1) != "1.20.0" ]]; then
|
||||
if [[ "$CURRENT_VERSION" != "1.20.0" ]]; then
|
||||
msg_error "Upgrade from ${CURRENT_VERSION} to ${PANGOLIN_VERSION} is not supported by this script."
|
||||
echo -e "${INFO}${YW}This installation uses SQLite. Please perform a fresh install with PostgreSQL.${CL}"
|
||||
echo -e "${INFO}${YW}See: https://docs.pangolin.net/self-host/advanced/database-options${CL}"
|
||||
exit 1
|
||||
fi
|
||||
if ! command -v psql &>/dev/null; then
|
||||
msg_error "This installation uses SQLite and cannot be upgraded to Pangolin ${PANGOLIN_VERSION}."
|
||||
echo -e "${INFO}${YW}Starting with Pangolin 1.20.0, PostgreSQL is required as the database backend.${CL}"
|
||||
echo -e "${INFO}${YW}An automatic migration of your existing SQLite data is not supported.${CL}"
|
||||
echo -e "${INFO}${YW}Please create a new LXC with the Pangolin install script, which sets up PostgreSQL automatically.${CL}"
|
||||
echo -e "${INFO}${YW}Your current data is preserved in this container and can be manually migrated if needed.${CL}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
|
||||
Reference in New Issue
Block a user