From 14aa6e8b4d6500292d710cc27616bff777f19c71 Mon Sep 17 00:00:00 2001 From: Myron Blair Date: Tue, 9 Jun 2026 22:55:38 +0000 Subject: [PATCH] =?UTF-8?q?Fix=20column=20name:=20commit=5Fhash=20?= =?UTF-8?q?=E2=86=92=20git=5Fcommit=20in=20novacpx=5Fversion=20INSERT?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- deploy/deploy-runner.sh | 2 +- panel/api/endpoints/system.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/deploy-runner.sh b/deploy/deploy-runner.sh index b4a9550..6fd6a8f 100644 --- a/deploy/deploy-runner.sh +++ b/deploy/deploy-runner.sh @@ -91,7 +91,7 @@ while IFS='|' read -r REPO_PATH WEB_ROOT COMMIT; do # Record new version in DB NEW_VERSION=$(cat "$REPO_PATH/VERSION" 2>/dev/null | tr -d '[:space:]' || true) if [[ -n "$NEW_VERSION" && -f "$DB_PATH" ]]; then - sqlite3 "$DB_PATH" "INSERT INTO novacpx_version (version, installed_at, notes, commit_hash) VALUES ('$NEW_VERSION', datetime('now'), 'Auto-deployed via webhook ($CHANNEL channel)', '$AFTER')" 2>/dev/null || true + sqlite3 "$DB_PATH" "INSERT INTO novacpx_version (version, installed_at, notes, git_commit) VALUES ('$NEW_VERSION', datetime('now'), 'Auto-deployed via webhook ($CHANNEL channel)', '$AFTER')" 2>/dev/null || true sqlite3 "$DB_PATH" "INSERT INTO settings (key, value, updated_at) VALUES ('panel_version', '$NEW_VERSION', datetime('now')) ON CONFLICT(key) DO UPDATE SET value=excluded.value, updated_at=excluded.updated_at" 2>/dev/null || true log "Version updated to $NEW_VERSION" fi diff --git a/panel/api/endpoints/system.php b/panel/api/endpoints/system.php index 2683c13..c8b64ca 100644 --- a/panel/api/endpoints/system.php +++ b/panel/api/endpoints/system.php @@ -308,7 +308,7 @@ BASH; // Record new version in novacpx_version table and settings $newVersion = trim(shell_exec("sudo cat " . escapeshellarg("$srcDir/VERSION") . " 2>/dev/null") ?: ''); if ($newVersion) { - $db->execute("INSERT INTO novacpx_version (version, installed_at, notes, commit_hash) VALUES (?,datetime('now'),?,?)", + $db->execute("INSERT INTO novacpx_version (version, installed_at, notes, git_commit) VALUES (?,datetime('now'),?,?)", [$newVersion, "Updated via admin panel from {$before} (channel: {$channel})", $after]); $db->execute("INSERT INTO settings (`key`,`value`,updated_at) VALUES ('panel_version',?,datetime('now')) ON CONFLICT(`key`) DO UPDATE SET value=excluded.value,updated_at=excluded.updated_at", [$newVersion]);