CREATE TABLE `zspace_licence` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `device_id` text NOT NULL,
  `user_id` int(11) NOT NULL,
  `zspace_licence_group_id` int(11) NOT NULL,
  `name` text NOT NULL,
  `licence_key` text NOT NULL,
  `software_version` text NOT NULL,
  `installed_status` tinyint(4) NOT NULL DEFAULT '0',
  `revoke_status` tinyint(4) NOT NULL DEFAULT '0',
  `duration` text NOT NULL,
  `expiry_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `creation_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `start_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `activation_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8