@@ -40,7 +40,7 @@ function migrate($db) {
|
|||||||
)");
|
)");
|
||||||
try {
|
try {
|
||||||
$rootDb = new PDO("mysql:host=" . (getenv('DB_HOST') ?: 'mysql') . ";charset=utf8mb4", 'root', getenv('MYSQL_ROOT_PASSWORD') ?: 'neptune_root_pass');
|
$rootDb = new PDO("mysql:host=" . (getenv('DB_HOST') ?: 'mysql') . ";charset=utf8mb4", 'root', getenv('MYSQL_ROOT_PASSWORD') ?: 'neptune_root_pass');
|
||||||
$rootDb->exec("ALTER TABLE neptune.network_nodes ADD COLUMN IF NOT EXISTS notes TEXT DEFAULT '' AFTER group_name");
|
$rootDb->exec("ALTER TABLE neptune.network_nodes ADD COLUMN IF NOT EXISTS notes VARCHAR(1000) DEFAULT '' AFTER group_name");
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+1
-1
@@ -33,7 +33,7 @@ CREATE TABLE IF NOT EXISTS network_nodes (
|
|||||||
node_type ENUM('host','server','router','firewall','switch','cloud','endpoint','other') DEFAULT 'host',
|
node_type ENUM('host','server','router','firewall','switch','cloud','endpoint','other') DEFAULT 'host',
|
||||||
status ENUM('online','offline','unknown','compromised','monitoring') DEFAULT 'unknown',
|
status ENUM('online','offline','unknown','compromised','monitoring') DEFAULT 'unknown',
|
||||||
group_name VARCHAR(100) DEFAULT 'default',
|
group_name VARCHAR(100) DEFAULT 'default',
|
||||||
notes TEXT DEFAULT '',
|
notes VARCHAR(1000) DEFAULT '',
|
||||||
pos_x FLOAT DEFAULT 0,
|
pos_x FLOAT DEFAULT 0,
|
||||||
pos_y FLOAT DEFAULT 0,
|
pos_y FLOAT DEFAULT 0,
|
||||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||||
|
|||||||
Reference in New Issue
Block a user