-- Importar esto desde phpMyAdmin (cPanel > phpMyAdmin > elegí tu base de datos > pestaña "Importar").
CREATE TABLE IF NOT EXISTS devices (
    id INT AUTO_INCREMENT PRIMARY KEY,
    device_code VARCHAR(20) NOT NULL UNIQUE,
    device_name VARCHAR(100) DEFAULT NULL,
    platform VARCHAR(20) DEFAULT NULL,
    xtream_server VARCHAR(255) DEFAULT NULL,
    xtream_username VARCHAR(100) DEFAULT NULL,
    xtream_password VARCHAR(100) DEFAULT NULL,
    activated TINYINT(1) NOT NULL DEFAULT 0,
    created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
    activated_at DATETIME DEFAULT NULL
);
