CREATE TABLE IF NOT EXISTS licencias (
  id INT AUTO_INCREMENT PRIMARY KEY,
  clave VARCHAR(100) NOT NULL,
  hwid VARCHAR(255) NOT NULL,
  activo TINYINT(1) DEFAULT 1,
  vence DATE NULL,
  nota VARCHAR(255) NULL,
  creado TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  UNIQUE KEY unique_clave_hwid (clave, hwid)
);
