-- Create domain_zone table with comprehensive data fields
CREATE TABLE IF NOT EXISTS domain_zone (
    id INT AUTO_INCREMENT PRIMARY KEY,
    domain VARCHAR(63) NOT NULL UNIQUE,
    root_utf VARCHAR(255),
    punycode BOOLEAN DEFAULT FALSE,
    registration_url TEXT,
    whois_server VARCHAR(255),
    rdap_server VARCHAR(255),
    name_servers JSON,
    sponsoring TEXT,
    administrative TEXT,
    technical TEXT,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    removed BOOLEAN DEFAULT FALSE,
    INDEX idx_domain (domain),
    INDEX idx_removed (removed),
    INDEX idx_root_utf (root_utf),
    INDEX idx_punycode (punycode),
    INDEX idx_whois_server (whois_server),
    INDEX idx_rdap_server (rdap_server)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
