CREATE TABLE IF NOT EXISTS licenses (
    id INT(11) NOT NULL AUTO_INCREMENT,
    license_key VARCHAR(100) NOT NULL,
    domain VARCHAR(255) NOT NULL,
    addon_name VARCHAR(100) NOT NULL,
    status ENUM('active','inactive') DEFAULT 'active',
    created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    PRIMARY KEY (id),
    UNIQUE KEY license_key (license_key),
    UNIQUE KEY domain_addon (domain, addon_name)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
