CREATE TABLE licenses (
  license_key VARCHAR(32) PRIMARY KEY,
  mac_address VARCHAR(32),
  status ENUM('active','inactive') DEFAULT 'inactive',
  activated_at DATETIME,
  expires_at DATETIME
);

CREATE TABLE license_history (
  id INT AUTO_INCREMENT PRIMARY KEY,
  license_key VARCHAR(32),
  mac_address VARCHAR(32),
  action VARCHAR(32),
  timestamp DATETIME DEFAULT CURRENT_TIMESTAMP,
  detail TEXT
);
