INSERT IGNORE INTO `#__rsform_config` (`SettingName`, `SettingValue`) VALUES ('zohocrm.host', 'zoho.com'),('zohocrm.client_id', ''),('zohocrm.client_secret', ''), ('zohocrm.grant_token', ''), ('zohocrm.user_email', '');

CREATE TABLE IF NOT EXISTS `#__rsform_zohocrm` (
  `form_id` int(11) NOT NULL,
  `zh_wf_trigger` tinyint(1) NOT NULL,
  `zh_duplicate_check` tinyint(1) NOT NULL,
  `zh_is_approval` tinyint(1) NOT NULL,
  `zh_format` tinyint(1) NOT NULL,
  `zh_layout_id` varchar(255) NOT NULL,
  `zh_merge_vars` text NOT NULL,
  `zh_track_ga` tinyint(1) NOT NULL,
  `zh_lar_id` varchar(100) NOT NULL,
  `zh_debug` tinyint(1) NOT NULL,
  `zh_published` tinyint(1) NOT NULL,
  `zh_action` tinyint(1) NOT NULL DEFAULT '1',
  `zh_action_field` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY  (`form_id`)
) DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `#__rsform_zohocrm_oauthtokens` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `useridentifier` varchar(100) NOT NULL,
  `clientid` varchar(100) NOT NULL,
  `accesstoken` varchar(100) NOT NULL,
  `refreshtoken` varchar(100) NOT NULL,
  `expirytime` bigint(20) NOT NULL,
  PRIMARY KEY (`id`)
) DEFAULT CHARSET=utf8;