Migração db - Integração Pangolin Proxy

This commit is contained in:
2025-12-06 21:25:51 -03:00
parent 5291d8ccae
commit 596370df27
2 changed files with 11 additions and 0 deletions

View File

@@ -49,12 +49,14 @@ CREATE TABLE `servers` (
`ip_v6` varchar(100) DEFAULT NULL,
`serial_key` varchar(255) NOT NULL,
`machine_id` varchar(255) DEFAULT NULL,
`last_seen` datetime DEFAULT NULL,
`status` enum('active','inactive') NOT NULL DEFAULT 'active',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `serial_key` (`serial_key`),
KEY `client_id` (`client_id`),
KEY `idx_last_seen` (`last_seen`),
CONSTRAINT `fk_servers_client` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;