This commit is contained in:
Halbe Bruno
2025-12-05 19:40:39 -03:00
commit f37bc712e6
4312 changed files with 359196 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
<?php
require_once __DIR__ . '/../vendor/autoload.php';
use App\Config\Database;
try {
$conn = Database::getInstance()->getConnection();
echo "Adicionando coluna 'last_seen' na tabela 'servers'...\n";
// Check if column exists
$stmt = $conn->query("SHOW COLUMNS FROM servers LIKE 'last_seen'");
if ($stmt->rowCount() == 0) {
$sql = "ALTER TABLE servers ADD COLUMN last_seen TIMESTAMP NULL DEFAULT NULL AFTER status";
$conn->exec($sql);
echo "Coluna 'last_seen' adicionada com sucesso.\n";
} else {
echo "Coluna 'last_seen' já existe.\n";
}
} catch (Exception $e) {
echo "Erro: " . $e->getMessage() . "\n";
exit(1);
}