/* RAIET v1.43.23 — Minecraft Java AUTO + local launcher bridge metadata. */
ALTER TABLE lobbies
    ADD COLUMN server_client_version VARCHAR(32) NULL AFTER server_port;

ALTER TABLE game_server_catalog
    ADD COLUMN client_version VARCHAR(32) NULL AFTER connection_method,
    ADD COLUMN last_version VARCHAR(80) NULL AFTER last_language,
    ADD COLUMN last_protocol INT NULL AFTER last_version;

/* First curated Java server: manually proven through the same launcher bridge
   during integration testing. AUTO still performs a fresh live capacity query
   before Ready Check and again before Start. */
INSERT INTO game_server_catalog
    (game_key, mode_key, server_name, host, port, connection_method, client_version, is_verified, is_enabled, priority, created_at, updated_at)
VALUES
    ('minecraft', 'java_community', 'LuckyDayz', 'go.luckydayz.ru', 25565, 'minecraft_java_bridge', '1.16.5', 1, 1, 10, NOW(), NOW())
ON DUPLICATE KEY UPDATE
    mode_key=VALUES(mode_key),
    server_name=VALUES(server_name),
    connection_method=VALUES(connection_method),
    client_version=VALUES(client_version),
    is_verified=VALUES(is_verified),
    is_enabled=VALUES(is_enabled),
    priority=VALUES(priority),
    updated_at=NOW();
