CREATE TABLE IF NOT EXISTS `jin_syevent` (
 `id` int(11) NOT NULL,
 `signature` char(8) NOT NULL DEFAULT '',
 `title` varchar(255) NOT NULL DEFAULT '',
 `membership_id` int(11) NOT NULL DEFAULT '0',
 `pagesize` int(3) NOT NULL DEFAULT '0',
 `period_validity` int(11) NOT NULL DEFAULT '0',
 `max_image_size` int(6) NOT NULL DEFAULT '0',
 `max_download_size` int(6) NOT NULL DEFAULT '0',
 `template_list` longtext NOT NULL,
 `template_submit` longtext NOT NULL,
 `style_id` int(11) NOT NULL DEFAULT '0',
 PRIMARY KEY (`id`),
 KEY `signature` (`signature`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE IF NOT EXISTS `jin_syevent_prod` (
 `id` int(11) NOT NULL,
 `signature` char(8) NOT NULL DEFAULT '',
 `ctime` datetime DEFAULT NULL,
 `user_id` int(11) NOT NULL,
 `syevent_id` int(11) NOT NULL DEFAULT '0',
 `approved` int(1) NOT NULL DEFAULT '0',
 `sortdate` datetime DEFAULT NULL,
 `title` varchar(255) NOT NULL DEFAULT '',
 `url` varchar(255) NOT NULL DEFAULT '',
 `descr` text NOT NULL,
 `price` varchar(30) NOT NULL DEFAULT '',
 `cover_url` varchar(255) NOT NULL DEFAULT '',
 `download_url` varchar(255) NOT NULL DEFAULT '',
 PRIMARY KEY (`id`),
 KEY `syevent_id` (`syevent_id`,`approved`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

ALTER TABLE `jin_package` ADD `thankpage` varchar(255) NOT NULL DEFAULT '' AFTER `homepage`;
ALTER TABLE `jin_user` ADD `syevent_id` int(11) NOT NULL DEFAULT '0' AFTER `referer_id`;
ALTER TABLE `jin_package` ADD `opt_in` VARCHAR(255) NOT NULL DEFAULT '' AFTER `use_terms`;
ALTER TABLE `jin_package` ADD `is_customized` tinyint(1) NOT NULL DEFAULT '0' AFTER `html_foot`;
ALTER TABLE `jin_user` ADD `receive_sms` tinyint(1) NOT NULL DEFAULT '0' AFTER `no_upline_mail`;
ALTER TABLE `jin_package` ADD `membership_id` int(11) NOT NULL DEFAULT '0' AFTER `sale_autoresp_ids`;
ALTER TABLE `jin_package` ADD `altpage` varchar(255) NOT NULL DEFAULT '' AFTER `thankpage`;
ALTER TABLE `jin_role` ADD `priv_master_store_extints` varchar(50) NOT NULL DEFAULT '' AFTER `priv_master_store_extscripts`;
ALTER TABLE `jin_role` ADD `priv_master_plugins_syevents` varchar(50) NOT NULL DEFAULT '' AFTER `priv_master_plugins_jvevents`;
