CREATE TABLE IF NOT EXISTS `licenses` (
  `id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
  `license_key` VARCHAR(64) NOT NULL,
  `buyer_name` VARCHAR(150) DEFAULT NULL,
  `buyer_email` VARCHAR(150) DEFAULT NULL,
  `product` VARCHAR(100) NOT NULL DEFAULT 'vtu-script',
  `status` ENUM('active','revoked') NOT NULL DEFAULT 'active',
  `bound_domain` VARCHAR(255) DEFAULT NULL,
  `activated_at` DATETIME DEFAULT NULL,
  `last_verified_at` DATETIME DEFAULT NULL,
  `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_license_key` (`license_key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
