fixing notes not being saved
Deploy / deploy (push) Successful in 39s

This commit is contained in:
2026-05-07 21:12:34 +02:00
parent 580155d977
commit 01e68cce9b
2 changed files with 4 additions and 4 deletions
+3
View File
@@ -14,6 +14,9 @@ require_once __DIR__ . '/../config/database.php';
$db = getDbConnection();
// Ensure notes column exists
try { $db->exec("ALTER TABLE network_nodes ADD COLUMN notes TEXT DEFAULT '' AFTER group_name"); } catch (Exception $e) {}
// Auth check (except for session check)
$path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
$path = str_replace('/api/', '', $path);
-3
View File
@@ -39,10 +39,7 @@ function migrate($db) {
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
)");
try {
$r = $db->query("SHOW COLUMNS FROM network_nodes LIKE 'notes'");
if ($r->rowCount() === 0) {
$db->exec("ALTER TABLE network_nodes ADD COLUMN notes TEXT DEFAULT '' AFTER group_name");
}
} catch (Exception $e) {
}
}