@@ -39,5 +39,11 @@ function migrate($db) {
|
|||||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||||
)");
|
)");
|
||||||
// Add notes column if missing
|
// Add notes column if missing
|
||||||
try { $db->exec("ALTER TABLE network_nodes ADD COLUMN notes TEXT DEFAULT ''"); } catch (Exception $e) {}
|
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) {
|
||||||
|
// Table might not exist yet, ignore
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user