-- Respaldo logico previo a la deprecacion de la tabla `servers`
-- Fecha: 2026-05-23

DROP TABLE IF EXISTS `servers_backup_20260523`;
CREATE TABLE `servers_backup_20260523` (
  `id` int(11) NOT NULL,
  `nombre` varchar(100) NOT NULL,
  `ip_publica` varchar(45) NOT NULL,
  `tipo` varchar(20) NOT NULL,
  `proveedor` varchar(100) DEFAULT NULL,
  `region` varchar(100) DEFAULT NULL,
  `sistema_operativo` varchar(100) DEFAULT NULL,
  `activo` tinyint(1) NOT NULL DEFAULT 1,
  `observaciones` text DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

INSERT INTO `servers_backup_20260523`
  (`id`,`nombre`,`ip_publica`,`tipo`,`proveedor`,`region`,`sistema_operativo`,`activo`,`observaciones`,`created_at`,`updated_at`)
VALUES
  (1,'vps40','92.222.243.41','app','OVH','Canada','Ubuntu 22.04',1,'Servidor principal aplicaciones','2026-03-09 21:20:24',NULL),
  (2,'vps41','92.222.243.410','db','OVH','Canada','Ubuntu 22.04',1,'Servidor base de datos principal','2026-03-09 21:20:47',NULL),
  (3,'vps42','92.222.243.42','app','OVH','Canada','Ubuntu 22.04',1,'Servidor staging aplicaciones','2026-03-09 21:22:44',NULL),
  (4,'vps43','92.222.243.43','db','OVH','Canada','Ubuntu 22.04',1,'Servidor staging base de datos','2026-03-09 21:23:03',NULL),
  (6,'OVH_CLOUDDB_ASSISTPRO_CORE','se311690-001.ca.clouddb.ovh.net','db','OVH','Managed','Managed MySQL',1,'Managed MySQL compartido para tenants AssistPro ER','2026-05-23 19:10:42','2026-05-23 19:11:57');
