CREATE TABLE `jin_ext_script_action` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `ext_script_id` int(11) DEFAULT NULL,
  `case` tinyint(1) DEFAULT NULL,
  `action` tinyint(1) DEFAULT NULL,
  `product_id` int(11) DEFAULT NULL,
  `package_id` int(11) DEFAULT NULL,
  `donr` int(3) DEFAULT NULL,
  `dbs` int(3) DEFAULT NULL,
  `dbt` int(3) DEFAULT NULL,
  `dbs_email` text,
  `dbt_email` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=latin1;

CREATE TABLE `jin_ext_script_action_log` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `action_id` int(11) DEFAULT NULL,
  `dlv_id` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `dt_onr` date DEFAULT NULL,
  `is_onr` tinyint(1) DEFAULT NULL,
  `dt_suspend` date DEFAULT NULL,
  `is_suspended` tinyint(1) DEFAULT '0',
  `dt_terminate` date DEFAULT NULL,
  `is_terminated` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `IX_UNIQUE` (`action_id`,`dlv_id`,`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=latin1;