SET FOREIGN_KEY_CHECKS = 0;

DROP TABLE IF EXISTS `cms10_actionlogs`;

CREATE TABLE `cms10_actionlogs` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `the_type` varchar(80) NOT NULL,
  `param_a` varchar(80) NOT NULL,
  `param_b` varchar(255) NOT NULL,
  `member_id` int(11) NOT NULL,
  `ip` varchar(40) NOT NULL,
  `date_and_time` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `xas` (`member_id`),
  KEY `ts` (`date_and_time`),
  KEY `aip` (`ip`),
  KEY `athe_type` (`the_type`)
) ENGINE=MyISAM AUTO_INCREMENT=3582 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_activities`;

CREATE TABLE `cms10_activities` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `a_member_id` int(11) NOT NULL,
  `a_also_involving` int(11) DEFAULT NULL,
  `a_language_string_code` varchar(80) NOT NULL,
  `a_label_1` varchar(255) NOT NULL,
  `a_label_2` varchar(255) NOT NULL,
  `a_label_3` varchar(255) NOT NULL,
  `a_page_link_1` varchar(255) NOT NULL,
  `a_page_link_2` varchar(255) NOT NULL,
  `a_page_link_3` varchar(255) NOT NULL,
  `a_time` int(10) unsigned NOT NULL,
  `a_addon` varchar(80) NOT NULL,
  `a_is_public` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`,`a_member_id`,`a_language_string_code`),
  KEY `a_member_id` (`a_member_id`),
  KEY `a_also_involving` (`a_also_involving`),
  KEY `a_time` (`a_time`),
  KEY `a_filtered_ordered` (`a_member_id`,`a_time`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_addons`;

CREATE TABLE `cms10_addons` (
  `addon_name` varchar(255) NOT NULL,
  `addon_author` varchar(255) NOT NULL,
  `addon_organisation` varchar(255) NOT NULL,
  `addon_version` varchar(255) NOT NULL,
  `addon_category` varchar(255) NOT NULL,
  `addon_copyright_attribution` varchar(255) NOT NULL,
  `addon_licence` varchar(255) NOT NULL,
  `addon_description` longtext NOT NULL,
  `addon_install_time` int(10) unsigned NOT NULL,
  PRIMARY KEY (`addon_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `cms10_addons_dependencies`;

CREATE TABLE `cms10_addons_dependencies` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `addon_name` varchar(255) NOT NULL,
  `addon_name_dependant_upon` varchar(255) NOT NULL,
  `addon_name_incompatibility` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=123 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_addons_files`;

CREATE TABLE `cms10_addons_files` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `addon_name` varchar(255) NOT NULL,
  `filename` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=11699 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_aggregate_type_instances`;

CREATE TABLE `cms10_aggregate_type_instances` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `aggregate_label` varchar(255) NOT NULL,
  `aggregate_type` varchar(80) NOT NULL,
  `other_parameters` longtext NOT NULL,
  `add_time` int(10) unsigned NOT NULL,
  `edit_time` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `aggregate_lookup` (`aggregate_label`(250))
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_alternative_ids`;

CREATE TABLE `cms10_alternative_ids` (
  `resource_type` varchar(80) NOT NULL,
  `resource_id` varchar(80) NOT NULL,
  `resource_moniker` varchar(80) NOT NULL,
  `resource_label` varchar(255) NOT NULL,
  `resource_guid` varchar(80) NOT NULL,
  `resource_resource_fs_hook` varchar(80) NOT NULL,
  PRIMARY KEY (`resource_type`,`resource_id`),
  KEY `resource_guid` (`resource_guid`),
  KEY `resource_label` (`resource_label`(250)),
  KEY `resource_moniker` (`resource_moniker`,`resource_type`),
  KEY `resource_moniker_uniq` (`resource_moniker`,`resource_resource_fs_hook`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_attachment_refs`;

CREATE TABLE `cms10_attachment_refs` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `r_referer_type` varchar(80) NOT NULL,
  `r_referer_id` varchar(80) NOT NULL,
  `a_id` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_attachments`;

CREATE TABLE `cms10_attachments` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `a_member_id` int(11) NOT NULL,
  `a_file_size` int(11) DEFAULT NULL,
  `a_url` varchar(255) NOT NULL,
  `a_description` varchar(255) NOT NULL,
  `a_thumb_url` varchar(255) NOT NULL,
  `a_original_filename` varchar(255) NOT NULL,
  `a_num_downloads` int(11) NOT NULL,
  `a_last_downloaded_time` int(11) DEFAULT NULL,
  `a_add_time` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `ownedattachments` (`a_member_id`),
  KEY `attachmentlimitcheck` (`a_add_time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_authors`;

CREATE TABLE `cms10_authors` (
  `author` varchar(80) NOT NULL,
  `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `member_id` int(11) DEFAULT NULL,
  `description` int(11) NOT NULL,
  `skills` int(11) NOT NULL,
  PRIMARY KEY (`author`),
  KEY `findmemberlink` (`member_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_autosave`;

CREATE TABLE `cms10_autosave` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `a_member_id` int(11) NOT NULL,
  `a_key` longtext NOT NULL,
  `a_value` longtext NOT NULL,
  `a_time` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `myautosaves` (`a_member_id`)
) ENGINE=MyISAM AUTO_INCREMENT=36 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_award_archive`;

CREATE TABLE `cms10_award_archive` (
  `a_type_id` int(11) NOT NULL,
  `date_and_time` int(10) unsigned NOT NULL,
  `content_id` varchar(80) NOT NULL,
  `member_id` int(11) NOT NULL,
  PRIMARY KEY (`a_type_id`,`date_and_time`),
  KEY `awardquicksearch` (`content_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_award_types`;

CREATE TABLE `cms10_award_types` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `a_title` int(10) unsigned NOT NULL,
  `a_description` int(11) NOT NULL,
  `a_points` int(11) NOT NULL,
  `a_content_type` varchar(80) NOT NULL,
  `a_hide_awardee` tinyint(1) NOT NULL,
  `a_update_time_hours` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_bank`;

CREATE TABLE `cms10_bank` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `member_id` int(11) NOT NULL,
  `amount` int(11) NOT NULL,
  `dividend` int(11) NOT NULL,
  `add_time` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_banned_ip`;

CREATE TABLE `cms10_banned_ip` (
  `ip` varchar(40) NOT NULL,
  `i_descrip` longtext NOT NULL,
  `i_ban_until` int(10) unsigned DEFAULT NULL,
  `i_ban_positive` tinyint(1) NOT NULL,
  PRIMARY KEY (`ip`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_banner_clicks`;

CREATE TABLE `cms10_banner_clicks` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `c_date_and_time` int(10) unsigned NOT NULL,
  `c_member_id` int(11) NOT NULL,
  `c_ip_address` varchar(40) NOT NULL,
  `c_source` varchar(80) NOT NULL,
  `c_banner_id` varchar(80) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `clicker_ip` (`c_ip_address`),
  KEY `c_banner_id` (`c_banner_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_banner_types`;

CREATE TABLE `cms10_banner_types` (
  `id` varchar(80) NOT NULL,
  `t_is_textual` tinyint(1) NOT NULL,
  `t_image_width` int(11) NOT NULL,
  `t_image_height` int(11) NOT NULL,
  `t_max_file_size` int(11) NOT NULL,
  `t_comcode_inline` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `hottext` (`t_comcode_inline`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_banners`;

CREATE TABLE `cms10_banners` (
  `name` varchar(80) NOT NULL,
  `expiry_date` int(10) unsigned DEFAULT NULL,
  `submitter` int(11) NOT NULL,
  `img_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `the_type` tinyint(4) NOT NULL,
  `b_title_text` varchar(255) NOT NULL,
  `caption` int(11) NOT NULL,
  `b_direct_code` longtext NOT NULL,
  `campaign_remaining` int(11) NOT NULL,
  `site_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `hits_from` int(11) NOT NULL,
  `views_from` int(11) NOT NULL,
  `hits_to` int(11) NOT NULL,
  `views_to` int(11) NOT NULL,
  `importance_modulus` int(11) NOT NULL,
  `notes` longtext NOT NULL,
  `validated` tinyint(1) NOT NULL,
  `add_date` int(10) unsigned NOT NULL,
  `edit_date` int(10) unsigned DEFAULT NULL,
  `b_type` varchar(80) NOT NULL,
  PRIMARY KEY (`name`),
  KEY `banner_child_find` (`b_type`),
  KEY `the_type` (`the_type`),
  KEY `expiry_date` (`expiry_date`),
  KEY `badd_date` (`add_date`),
  KEY `topsites` (`hits_from`,`hits_to`),
  KEY `campaign_remaining` (`campaign_remaining`),
  KEY `bvalidated` (`validated`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_banners_types`;

CREATE TABLE `cms10_banners_types` (
  `name` varchar(80) NOT NULL,
  `b_type` varchar(80) NOT NULL,
  PRIMARY KEY (`name`,`b_type`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_blocks`;

CREATE TABLE `cms10_blocks` (
  `block_name` varchar(80) NOT NULL,
  `block_author` varchar(80) NOT NULL,
  `block_organisation` varchar(80) NOT NULL,
  `block_hacked_by` varchar(80) NOT NULL,
  `block_hack_version` int(11) DEFAULT NULL,
  `block_version` int(11) NOT NULL,
  PRIMARY KEY (`block_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_bookable`;

CREATE TABLE `cms10_bookable` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `title` int(11) NOT NULL,
  `description` int(11) NOT NULL,
  `price` double NOT NULL,
  `categorisation` int(11) NOT NULL,
  `cycle_type` varchar(80) NOT NULL,
  `cycle_pattern` varchar(255) NOT NULL,
  `user_may_choose_code` tinyint(1) NOT NULL,
  `supports_notes` tinyint(1) NOT NULL,
  `dates_are_ranges` tinyint(1) NOT NULL,
  `calendar_type` int(11) DEFAULT NULL,
  `add_date` int(10) unsigned NOT NULL,
  `edit_date` int(10) unsigned DEFAULT NULL,
  `submitter` int(11) NOT NULL,
  `sort_order` int(11) NOT NULL,
  `enabled` tinyint(1) NOT NULL,
  `active_from_day` tinyint(4) NOT NULL,
  `active_from_month` tinyint(4) NOT NULL,
  `active_from_year` int(11) NOT NULL,
  `active_to_day` tinyint(4) DEFAULT NULL,
  `active_to_month` tinyint(4) DEFAULT NULL,
  `active_to_year` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_bookable_blacked`;

CREATE TABLE `cms10_bookable_blacked` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `blacked_from_day` tinyint(4) NOT NULL,
  `blacked_from_month` tinyint(4) NOT NULL,
  `blacked_from_year` int(11) NOT NULL,
  `blacked_to_day` tinyint(4) NOT NULL,
  `blacked_to_month` tinyint(4) NOT NULL,
  `blacked_to_year` int(11) NOT NULL,
  `blacked_explanation` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_bookable_blacked_for`;

CREATE TABLE `cms10_bookable_blacked_for` (
  `bookable_id` int(11) NOT NULL,
  `blacked_id` int(11) NOT NULL,
  PRIMARY KEY (`bookable_id`,`blacked_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_bookable_codes`;

CREATE TABLE `cms10_bookable_codes` (
  `bookable_id` int(11) NOT NULL,
  `code` varchar(80) NOT NULL,
  PRIMARY KEY (`bookable_id`,`code`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_bookable_supplement`;

CREATE TABLE `cms10_bookable_supplement` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `price` double NOT NULL,
  `price_is_per_period` tinyint(1) NOT NULL,
  `supports_quantities` tinyint(1) NOT NULL,
  `title` int(11) NOT NULL,
  `promo_code` varchar(80) NOT NULL,
  `supports_notes` tinyint(1) NOT NULL,
  `sort_order` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_bookable_supplement_for`;

CREATE TABLE `cms10_bookable_supplement_for` (
  `supplement_id` int(11) NOT NULL,
  `bookable_id` int(11) NOT NULL,
  PRIMARY KEY (`supplement_id`,`bookable_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_booking`;

CREATE TABLE `cms10_booking` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `bookable_id` int(11) NOT NULL,
  `member_id` int(11) NOT NULL,
  `b_day` tinyint(4) NOT NULL,
  `b_month` tinyint(4) NOT NULL,
  `b_year` int(11) NOT NULL,
  `code_allocation` varchar(80) NOT NULL,
  `notes` longtext NOT NULL,
  `booked_at` int(10) unsigned NOT NULL,
  `paid_at` int(10) unsigned DEFAULT NULL,
  `paid_trans_id` int(11) DEFAULT NULL,
  `customer_name` varchar(255) NOT NULL,
  `customer_email` varchar(255) NOT NULL,
  `customer_mobile` varchar(255) NOT NULL,
  `customer_phone` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_booking_supplement`;

CREATE TABLE `cms10_booking_supplement` (
  `booking_id` int(11) NOT NULL,
  `supplement_id` int(11) NOT NULL,
  `quantity` int(11) NOT NULL,
  `notes` longtext NOT NULL,
  PRIMARY KEY (`booking_id`,`supplement_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_bookmarks`;

CREATE TABLE `cms10_bookmarks` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `b_owner` int(11) NOT NULL,
  `b_folder` varchar(255) NOT NULL,
  `b_title` varchar(255) NOT NULL,
  `b_page_link` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_cache`;

CREATE TABLE `cms10_cache` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cached_for` varchar(80) NOT NULL,
  `identifier` varchar(40) NOT NULL,
  `the_theme` varchar(40) NOT NULL,
  `staff_status` tinyint(1) DEFAULT NULL,
  `the_member` int(11) DEFAULT NULL,
  `groups` varchar(255) NOT NULL,
  `is_bot` tinyint(1) DEFAULT NULL,
  `timezone` varchar(40) NOT NULL,
  `lang` varchar(5) NOT NULL,
  `the_value` longtext NOT NULL,
  `dependencies` longtext NOT NULL,
  `date_and_time` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `cached_ford` (`date_and_time`),
  KEY `cached_fore` (`cached_for`),
  KEY `cached_forh` (`the_theme`),
  KEY `cached_forf` (`cached_for`,`identifier`,`the_theme`,`lang`,`staff_status`,`the_member`,`is_bot`)
) ENGINE=MyISAM AUTO_INCREMENT=204 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_cache_on`;

CREATE TABLE `cms10_cache_on` (
  `cached_for` varchar(80) NOT NULL,
  `cache_on` longtext NOT NULL,
  `special_cache_flags` int(11) NOT NULL,
  `cache_ttl` int(11) NOT NULL,
  PRIMARY KEY (`cached_for`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_cached_comcode_pages`;

CREATE TABLE `cms10_cached_comcode_pages` (
  `the_zone` varchar(80) NOT NULL,
  `the_page` varchar(80) NOT NULL,
  `string_index` int(11) NOT NULL,
  `the_theme` varchar(80) NOT NULL,
  `cc_page_title` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`the_zone`,`the_page`,`the_theme`),
  KEY `ftjoin_ccpt` (`cc_page_title`),
  KEY `ftjoin_ccsi` (`string_index`),
  KEY `ccp_join` (`the_page`,`the_zone`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_cached_weather_codes`;

CREATE TABLE `cms10_cached_weather_codes` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `w_string` varchar(255) NOT NULL,
  `w_code` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_calendar_events`;

CREATE TABLE `cms10_calendar_events` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `e_submitter` int(11) NOT NULL,
  `e_member_calendar` int(11) DEFAULT NULL,
  `e_views` int(11) NOT NULL,
  `e_title` int(11) NOT NULL,
  `e_content` int(11) NOT NULL,
  `e_add_date` int(10) unsigned NOT NULL,
  `e_edit_date` int(10) unsigned DEFAULT NULL,
  `e_recurrence` varchar(80) NOT NULL,
  `e_recurrences` tinyint(4) DEFAULT NULL,
  `e_seg_recurrences` tinyint(1) NOT NULL,
  `e_start_year` int(11) NOT NULL,
  `e_start_month` tinyint(4) NOT NULL,
  `e_start_day` tinyint(4) NOT NULL,
  `e_start_monthly_spec_type` varchar(80) NOT NULL,
  `e_start_hour` tinyint(4) DEFAULT NULL,
  `e_start_minute` tinyint(4) DEFAULT NULL,
  `e_end_year` int(11) DEFAULT NULL,
  `e_end_month` tinyint(4) DEFAULT NULL,
  `e_end_day` tinyint(4) DEFAULT NULL,
  `e_end_monthly_spec_type` varchar(80) NOT NULL,
  `e_end_hour` tinyint(4) DEFAULT NULL,
  `e_end_minute` tinyint(4) DEFAULT NULL,
  `e_timezone` varchar(80) NOT NULL,
  `e_do_timezone_conv` tinyint(1) NOT NULL,
  `e_priority` tinyint(4) NOT NULL,
  `allow_rating` tinyint(1) NOT NULL,
  `allow_comments` tinyint(4) NOT NULL,
  `allow_trackbacks` tinyint(1) NOT NULL,
  `notes` longtext NOT NULL,
  `e_type` int(11) NOT NULL,
  `validated` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `e_views` (`e_views`),
  KEY `ces` (`e_submitter`),
  KEY `e_type` (`e_type`),
  KEY `eventat` (`e_start_year`,`e_start_month`,`e_start_day`,`e_start_hour`,`e_start_minute`),
  KEY `e_add_date` (`e_add_date`),
  KEY `validated` (`validated`),
  KEY `ftjoin_etitle` (`e_title`),
  KEY `ftjoin_econtent` (`e_content`)
) ENGINE=MyISAM AUTO_INCREMENT=201 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_calendar_interests`;

CREATE TABLE `cms10_calendar_interests` (
  `i_member_id` int(11) NOT NULL,
  `t_type` int(11) NOT NULL,
  PRIMARY KEY (`i_member_id`,`t_type`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_calendar_jobs`;

CREATE TABLE `cms10_calendar_jobs` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `j_time` int(10) unsigned NOT NULL,
  `j_reminder_id` int(11) DEFAULT NULL,
  `j_member_id` int(11) DEFAULT NULL,
  `j_event_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `applicablejobs` (`j_time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_calendar_reminders`;

CREATE TABLE `cms10_calendar_reminders` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `e_id` int(11) NOT NULL,
  `n_member_id` int(11) NOT NULL,
  `n_seconds_before` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_calendar_types`;

CREATE TABLE `cms10_calendar_types` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `t_title` int(11) NOT NULL,
  `t_logo` varchar(255) NOT NULL,
  `t_external_feed` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_captchas`;

CREATE TABLE `cms10_captchas` (
  `si_session_id` varchar(80) NOT NULL,
  `si_time` int(10) unsigned NOT NULL,
  `si_code` varchar(80) NOT NULL,
  PRIMARY KEY (`si_session_id`),
  KEY `si_time` (`si_time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_catalogue_cat_treecache`;

CREATE TABLE `cms10_catalogue_cat_treecache` (
  `cc_id` int(11) NOT NULL,
  `cc_ancestor_id` int(11) NOT NULL,
  PRIMARY KEY (`cc_id`,`cc_ancestor_id`),
  KEY `cc_ancestor_id` (`cc_ancestor_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_catalogue_categories`;

CREATE TABLE `cms10_catalogue_categories` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `c_name` varchar(80) NOT NULL,
  `cc_title` int(10) unsigned NOT NULL,
  `cc_description` int(11) NOT NULL,
  `rep_image` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `cc_notes` longtext NOT NULL,
  `cc_add_date` int(10) unsigned NOT NULL,
  `cc_parent_id` int(11) DEFAULT NULL,
  `cc_move_target` int(11) DEFAULT NULL,
  `cc_move_days_lower` int(11) NOT NULL,
  `cc_move_days_higher` int(11) NOT NULL,
  `cc_order` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `catstoclean` (`cc_move_target`),
  KEY `cataloguefind` (`c_name`),
  KEY `cc_parent_id` (`cc_parent_id`),
  KEY `ftjoin_cctitle` (`cc_title`),
  KEY `ftjoin_ccdescrip` (`cc_description`),
  KEY `cc_order` (`cc_order`)
) ENGINE=MyISAM AUTO_INCREMENT=204 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_catalogue_childcountcache`;

CREATE TABLE `cms10_catalogue_childcountcache` (
  `cc_id` int(11) NOT NULL,
  `c_num_rec_children` int(11) NOT NULL,
  `c_num_rec_entries` int(11) NOT NULL,
  PRIMARY KEY (`cc_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_catalogue_efv_float`;

CREATE TABLE `cms10_catalogue_efv_float` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cf_id` int(11) NOT NULL,
  `ce_id` int(11) NOT NULL,
  `cv_value` double DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `fcv_value` (`cv_value`),
  KEY `fcf_id` (`cf_id`),
  KEY `fce_id` (`ce_id`),
  KEY `cefv_f_combo` (`ce_id`,`cf_id`)
) ENGINE=MyISAM AUTO_INCREMENT=397 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_catalogue_efv_integer`;

CREATE TABLE `cms10_catalogue_efv_integer` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cf_id` int(11) NOT NULL,
  `ce_id` int(11) NOT NULL,
  `cv_value` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `itv_value` (`cv_value`),
  KEY `icf_id` (`cf_id`),
  KEY `ice_id` (`ce_id`),
  KEY `cefv_i_combo` (`ce_id`,`cf_id`)
) ENGINE=MyISAM AUTO_INCREMENT=397 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_catalogue_efv_long`;

CREATE TABLE `cms10_catalogue_efv_long` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cf_id` int(11) NOT NULL,
  `ce_id` int(11) NOT NULL,
  `cv_value` longtext NOT NULL,
  PRIMARY KEY (`id`),
  KEY `cefv_l_combo` (`ce_id`,`cf_id`),
  KEY `lcf_id` (`cf_id`),
  KEY `lce_id` (`ce_id`),
  FULLTEXT KEY `lcv_value` (`cv_value`)
) ENGINE=MyISAM AUTO_INCREMENT=398 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_catalogue_efv_long_trans`;

CREATE TABLE `cms10_catalogue_efv_long_trans` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cf_id` int(11) NOT NULL,
  `ce_id` int(11) NOT NULL,
  `cv_value` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `cefv_lt_combo` (`ce_id`,`cf_id`),
  KEY `ltcf_id` (`cf_id`),
  KEY `ltce_id` (`ce_id`),
  KEY `ltcv_value` (`cv_value`)
) ENGINE=MyISAM AUTO_INCREMENT=200 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_catalogue_efv_short`;

CREATE TABLE `cms10_catalogue_efv_short` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cf_id` int(11) NOT NULL,
  `ce_id` int(11) NOT NULL,
  `cv_value` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `cefv_s_combo` (`ce_id`,`cf_id`),
  KEY `iscv_value` (`cv_value`(250)),
  KEY `scf_id` (`cf_id`),
  KEY `sce_id` (`ce_id`),
  FULLTEXT KEY `scv_value` (`cv_value`)
) ENGINE=MyISAM AUTO_INCREMENT=409 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_catalogue_efv_short_trans`;

CREATE TABLE `cms10_catalogue_efv_short_trans` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cf_id` int(11) NOT NULL,
  `ce_id` int(11) NOT NULL,
  `cv_value` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `cefv_st_combo` (`ce_id`,`cf_id`),
  KEY `stcf_id` (`cf_id`),
  KEY `stce_id` (`ce_id`),
  KEY `stcv_value` (`cv_value`)
) ENGINE=MyISAM AUTO_INCREMENT=200 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_catalogue_entries`;

CREATE TABLE `cms10_catalogue_entries` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `c_name` varchar(80) NOT NULL,
  `cc_id` int(11) NOT NULL,
  `ce_submitter` int(11) NOT NULL,
  `ce_add_date` int(10) unsigned NOT NULL,
  `ce_edit_date` int(10) unsigned DEFAULT NULL,
  `ce_views` int(11) NOT NULL,
  `ce_views_prior` int(11) NOT NULL,
  `ce_validated` tinyint(1) NOT NULL,
  `notes` longtext NOT NULL,
  `allow_rating` tinyint(1) NOT NULL,
  `allow_comments` tinyint(4) NOT NULL,
  `allow_trackbacks` tinyint(1) NOT NULL,
  `ce_last_moved` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `ce_views` (`ce_views`),
  KEY `ces` (`ce_submitter`),
  KEY `ce_validated` (`ce_validated`),
  KEY `ce_cc_id` (`cc_id`),
  KEY `ce_add_date` (`ce_add_date`),
  KEY `ce_c_name` (`c_name`)
) ENGINE=MyISAM AUTO_INCREMENT=201 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_catalogue_entry_linkage`;

CREATE TABLE `cms10_catalogue_entry_linkage` (
  `catalogue_entry_id` int(11) NOT NULL,
  `content_type` varchar(80) NOT NULL,
  `content_id` varchar(80) NOT NULL,
  PRIMARY KEY (`catalogue_entry_id`),
  KEY `custom_fields` (`content_type`,`content_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_catalogue_fields`;

CREATE TABLE `cms10_catalogue_fields` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `c_name` varchar(80) NOT NULL,
  `cf_name` int(10) unsigned NOT NULL,
  `cf_description` int(10) unsigned NOT NULL,
  `cf_type` varchar(80) NOT NULL,
  `cf_order` int(11) NOT NULL,
  `cf_defines_order` tinyint(4) NOT NULL,
  `cf_visible` tinyint(1) NOT NULL,
  `cf_searchable` tinyint(1) NOT NULL,
  `cf_default` longtext NOT NULL,
  `cf_required` tinyint(1) NOT NULL,
  `cf_put_in_category` tinyint(1) NOT NULL,
  `cf_put_in_search` tinyint(1) NOT NULL,
  `cf_options` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=33 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_catalogues`;

CREATE TABLE `cms10_catalogues` (
  `c_name` varchar(80) NOT NULL,
  `c_title` int(10) unsigned NOT NULL,
  `c_description` int(11) NOT NULL,
  `c_display_type` tinyint(4) NOT NULL,
  `c_is_tree` tinyint(1) NOT NULL,
  `c_notes` longtext NOT NULL,
  `c_add_date` int(10) unsigned NOT NULL,
  `c_submit_points` int(11) NOT NULL,
  `c_ecommerce` tinyint(1) NOT NULL,
  `c_default_review_freq` int(11) DEFAULT NULL,
  `c_send_view_reports` varchar(80) NOT NULL,
  PRIMARY KEY (`c_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_chargelog`;

CREATE TABLE `cms10_chargelog` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `member_id` int(11) NOT NULL,
  `amount` int(11) NOT NULL,
  `reason` int(11) NOT NULL,
  `date_and_time` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_chat_active`;

CREATE TABLE `cms10_chat_active` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `member_id` int(11) NOT NULL,
  `room_id` int(11) DEFAULT NULL,
  `date_and_time` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `active_ordering` (`date_and_time`),
  KEY `member_select` (`member_id`),
  KEY `room_select` (`room_id`)
) ENGINE=MyISAM AUTO_INCREMENT=8307 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_chat_blocking`;

CREATE TABLE `cms10_chat_blocking` (
  `member_blocker` int(11) NOT NULL,
  `member_blocked` int(11) NOT NULL,
  `date_and_time` int(10) unsigned NOT NULL,
  PRIMARY KEY (`member_blocker`,`member_blocked`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_chat_events`;

CREATE TABLE `cms10_chat_events` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `e_type_code` varchar(80) NOT NULL,
  `e_member_id` int(11) NOT NULL,
  `e_room_id` int(11) DEFAULT NULL,
  `e_date_and_time` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `event_ordering` (`e_date_and_time`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_chat_friends`;

CREATE TABLE `cms10_chat_friends` (
  `member_likes` int(11) NOT NULL,
  `member_liked` int(11) NOT NULL,
  `date_and_time` int(10) unsigned NOT NULL,
  PRIMARY KEY (`member_likes`,`member_liked`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_chat_messages`;

CREATE TABLE `cms10_chat_messages` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `system_message` tinyint(1) NOT NULL,
  `ip_address` varchar(40) NOT NULL,
  `room_id` int(11) NOT NULL,
  `member_id` int(11) NOT NULL,
  `date_and_time` int(10) unsigned NOT NULL,
  `the_message` int(11) NOT NULL,
  `text_colour` varchar(255) NOT NULL,
  `font_name` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `ordering` (`date_and_time`),
  KEY `room_id` (`room_id`)
) ENGINE=MyISAM AUTO_INCREMENT=201 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_chat_rooms`;

CREATE TABLE `cms10_chat_rooms` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `room_name` varchar(255) NOT NULL,
  `room_owner` int(11) DEFAULT NULL,
  `allow_list` longtext NOT NULL,
  `allow_list_groups` longtext NOT NULL,
  `disallow_list` longtext NOT NULL,
  `disallow_list_groups` longtext NOT NULL,
  `room_language` varchar(5) NOT NULL,
  `c_welcome` int(10) unsigned NOT NULL,
  `is_im` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `room_name` (`room_name`(250)),
  KEY `first_public` (`is_im`,`id`),
  KEY `allow_list` (`allow_list`(30)),
  KEY `is_im` (`is_im`)
) ENGINE=MyISAM AUTO_INCREMENT=201 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_chat_sound_effects`;

CREATE TABLE `cms10_chat_sound_effects` (
  `s_member` int(11) NOT NULL,
  `s_effect_id` varchar(80) NOT NULL,
  `s_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  PRIMARY KEY (`s_member`,`s_effect_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_classifieds_prices`;

CREATE TABLE `cms10_classifieds_prices` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `c_catalogue_name` varchar(80) NOT NULL,
  `c_days` int(11) NOT NULL,
  `c_label` int(10) unsigned NOT NULL,
  `c_price` double NOT NULL,
  PRIMARY KEY (`id`),
  KEY `c_catalogue_name` (`c_catalogue_name`)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_comcode_pages`;

CREATE TABLE `cms10_comcode_pages` (
  `the_zone` varchar(80) NOT NULL,
  `the_page` varchar(80) NOT NULL,
  `p_parent_page` varchar(80) NOT NULL,
  `p_validated` tinyint(1) NOT NULL,
  `p_edit_date` int(10) unsigned DEFAULT NULL,
  `p_add_date` int(10) unsigned NOT NULL,
  `p_submitter` int(11) NOT NULL,
  `p_show_as_edit` tinyint(1) NOT NULL,
  `p_order` int(11) NOT NULL,
  PRIMARY KEY (`the_zone`,`the_page`),
  KEY `p_submitter` (`p_submitter`),
  KEY `p_add_date` (`p_add_date`),
  KEY `p_validated` (`p_validated`),
  KEY `p_order` (`p_order`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_commandrchat`;

CREATE TABLE `cms10_commandrchat` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `c_message` longtext NOT NULL,
  `c_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `c_incoming` tinyint(1) NOT NULL,
  `c_timestamp` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_community_billboard`;

CREATE TABLE `cms10_community_billboard` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `member_id` int(11) NOT NULL,
  `the_message` int(11) NOT NULL,
  `days` int(11) NOT NULL,
  `order_time` int(10) unsigned NOT NULL,
  `activation_time` int(10) unsigned DEFAULT NULL,
  `active_now` tinyint(1) NOT NULL,
  `notes` longtext NOT NULL,
  PRIMARY KEY (`id`),
  KEY `find_active_billboard_msg` (`active_now`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_config`;

CREATE TABLE `cms10_config` (
  `c_name` varchar(80) NOT NULL,
  `c_set` tinyint(1) NOT NULL,
  `c_value` longtext NOT NULL,
  `c_value_trans` int(10) unsigned DEFAULT NULL,
  `c_needs_dereference` tinyint(1) NOT NULL,
  PRIMARY KEY (`c_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_content_privacy`;

CREATE TABLE `cms10_content_privacy` (
  `content_type` varchar(80) NOT NULL,
  `content_id` varchar(80) NOT NULL,
  `guest_view` tinyint(1) NOT NULL,
  `member_view` tinyint(1) NOT NULL,
  `friend_view` tinyint(1) NOT NULL,
  PRIMARY KEY (`content_type`,`content_id`),
  KEY `guest_view` (`guest_view`),
  KEY `member_view` (`member_view`),
  KEY `friend_view` (`friend_view`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_content_privacy__members`;

CREATE TABLE `cms10_content_privacy__members` (
  `content_type` varchar(80) NOT NULL,
  `content_id` varchar(80) NOT NULL,
  `member_id` int(11) NOT NULL,
  PRIMARY KEY (`content_type`,`content_id`,`member_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_content_read`;

CREATE TABLE `cms10_content_read` (
  `r_content_type` varchar(80) NOT NULL,
  `r_content_id` varchar(80) NOT NULL,
  `r_member_id` int(11) NOT NULL,
  `r_time` int(10) unsigned NOT NULL,
  PRIMARY KEY (`r_content_type`,`r_content_id`,`r_member_id`),
  KEY `content_read` (`r_content_type`,`r_content_id`),
  KEY `content_read_cleanup` (`r_time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_content_regions`;

CREATE TABLE `cms10_content_regions` (
  `content_type` varchar(80) NOT NULL,
  `content_id` varchar(80) NOT NULL,
  `region` varchar(80) NOT NULL,
  PRIMARY KEY (`content_type`,`content_id`,`region`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_content_reviews`;

CREATE TABLE `cms10_content_reviews` (
  `content_type` varchar(80) NOT NULL,
  `content_id` varchar(80) NOT NULL,
  `review_freq` int(11) DEFAULT NULL,
  `next_review_time` int(10) unsigned NOT NULL,
  `auto_action` varchar(80) NOT NULL,
  `review_notification_happened` tinyint(1) NOT NULL,
  `display_review_status` tinyint(1) NOT NULL,
  `last_reviewed_time` int(10) unsigned NOT NULL,
  PRIMARY KEY (`content_type`,`content_id`),
  KEY `next_review_time` (`next_review_time`,`review_notification_happened`),
  KEY `needs_review` (`next_review_time`,`content_type`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_credit_charge_log`;

CREATE TABLE `cms10_credit_charge_log` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `member_id` int(11) NOT NULL,
  `charging_member_id` int(11) NOT NULL,
  `num_credits` int(11) NOT NULL,
  `date_and_time` int(10) unsigned NOT NULL,
  `reason` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_credit_purchases`;

CREATE TABLE `cms10_credit_purchases` (
  `purchase_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `member_id` int(11) NOT NULL,
  `num_credits` int(11) NOT NULL,
  `date_and_time` int(10) unsigned NOT NULL,
  `purchase_validated` tinyint(1) NOT NULL,
  `is_manual` tinyint(1) NOT NULL,
  PRIMARY KEY (`purchase_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_cron_caching_requests`;

CREATE TABLE `cms10_cron_caching_requests` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `c_codename` varchar(80) NOT NULL,
  `c_map` longtext NOT NULL,
  `c_lang` varchar(5) NOT NULL,
  `c_theme` varchar(80) NOT NULL,
  `c_staff_status` tinyint(1) DEFAULT NULL,
  `c_member` int(11) DEFAULT NULL,
  `c_groups` varchar(255) NOT NULL,
  `c_is_bot` tinyint(1) DEFAULT NULL,
  `c_timezone` varchar(40) NOT NULL,
  `c_store_as_tempcode` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `c_compound` (`c_codename`,`c_theme`,`c_lang`,`c_timezone`),
  KEY `c_is_bot` (`c_is_bot`),
  KEY `c_store_as_tempcode` (`c_store_as_tempcode`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_custom_comcode`;

CREATE TABLE `cms10_custom_comcode` (
  `tag_tag` varchar(80) NOT NULL,
  `tag_title` int(10) unsigned NOT NULL,
  `tag_description` int(10) unsigned NOT NULL,
  `tag_replace` longtext NOT NULL,
  `tag_example` longtext NOT NULL,
  `tag_parameters` varchar(255) NOT NULL,
  `tag_enabled` tinyint(1) NOT NULL,
  `tag_dangerous_tag` tinyint(1) NOT NULL,
  `tag_block_tag` tinyint(1) NOT NULL,
  `tag_textual_tag` tinyint(1) NOT NULL,
  PRIMARY KEY (`tag_tag`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_db_meta`;

CREATE TABLE `cms10_db_meta` (
  `m_table` varchar(80) NOT NULL,
  `m_name` varchar(80) NOT NULL,
  `m_type` varchar(80) NOT NULL,
  PRIMARY KEY (`m_table`,`m_name`),
  KEY `findtransfields` (`m_type`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_db_meta_indices`;

CREATE TABLE `cms10_db_meta_indices` (
  `i_table` varchar(80) NOT NULL,
  `i_name` varchar(80) NOT NULL,
  `i_fields` varchar(80) NOT NULL,
  PRIMARY KEY (`i_table`,`i_name`,`i_fields`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_device_token_details`;

CREATE TABLE `cms10_device_token_details` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `token_type` varchar(80) NOT NULL,
  `device_token` varchar(255) NOT NULL,
  `member_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `member_id` (`member_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_digestives_consumed`;

CREATE TABLE `cms10_digestives_consumed` (
  `c_member_id` int(11) NOT NULL,
  `c_frequency` int(11) NOT NULL,
  `c_time` int(10) unsigned NOT NULL,
  PRIMARY KEY (`c_member_id`,`c_frequency`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_digestives_tin`;

CREATE TABLE `cms10_digestives_tin` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `d_subject` longtext NOT NULL,
  `d_message` int(11) NOT NULL,
  `d_from_member_id` int(11) DEFAULT NULL,
  `d_to_member_id` int(11) NOT NULL,
  `d_priority` tinyint(4) NOT NULL,
  `d_no_cc` tinyint(1) NOT NULL,
  `d_date_and_time` int(10) unsigned NOT NULL,
  `d_notification_code` varchar(80) NOT NULL,
  `d_code_category` varchar(255) NOT NULL,
  `d_frequency` int(11) NOT NULL,
  `d_read` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `d_date_and_time` (`d_date_and_time`),
  KEY `d_frequency` (`d_frequency`),
  KEY `d_to_member_id` (`d_to_member_id`),
  KEY `d_read` (`d_read`),
  KEY `unread` (`d_to_member_id`,`d_read`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_diseases`;

CREATE TABLE `cms10_diseases` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `image` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `cure` varchar(255) NOT NULL,
  `cure_price` int(11) NOT NULL,
  `immunisation` varchar(255) NOT NULL,
  `immunisation_price` int(11) NOT NULL,
  `spread_rate` int(11) NOT NULL,
  `points_per_spread` int(11) NOT NULL,
  `last_spread_time` int(11) NOT NULL,
  `enabled` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_download_categories`;

CREATE TABLE `cms10_download_categories` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `category` int(10) unsigned NOT NULL,
  `parent_id` int(11) DEFAULT NULL,
  `add_date` int(10) unsigned NOT NULL,
  `notes` longtext NOT NULL,
  `description` int(11) NOT NULL,
  `rep_image` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  PRIMARY KEY (`id`),
  KEY `child_find` (`parent_id`),
  KEY `ftjoin_dccat` (`category`),
  KEY `ftjoin_dcdescrip` (`description`)
) ENGINE=MyISAM AUTO_INCREMENT=201 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_download_downloads`;

CREATE TABLE `cms10_download_downloads` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `category_id` int(11) NOT NULL,
  `name` int(10) unsigned NOT NULL,
  `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `description` int(11) NOT NULL,
  `author` varchar(80) NOT NULL,
  `additional_details` int(11) NOT NULL,
  `num_downloads` int(11) NOT NULL,
  `out_mode_id` int(11) DEFAULT NULL,
  `add_date` int(10) unsigned NOT NULL,
  `edit_date` int(10) unsigned DEFAULT NULL,
  `validated` tinyint(1) NOT NULL,
  `default_pic` int(11) NOT NULL,
  `file_size` int(11) DEFAULT NULL,
  `allow_rating` tinyint(1) NOT NULL,
  `allow_comments` tinyint(4) NOT NULL,
  `allow_trackbacks` tinyint(1) NOT NULL,
  `notes` longtext NOT NULL,
  `download_views` int(11) NOT NULL,
  `download_cost` int(11) NOT NULL,
  `download_submitter_gets_points` tinyint(1) NOT NULL,
  `submitter` int(11) NOT NULL,
  `original_filename` varchar(255) NOT NULL,
  `rep_image` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `download_licence` int(11) DEFAULT NULL,
  `download_data_mash` longtext NOT NULL,
  `url_redirect` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  PRIMARY KEY (`id`),
  KEY `download_views` (`download_views`),
  KEY `category_list` (`category_id`),
  KEY `recent_downloads` (`add_date`),
  KEY `top_downloads` (`num_downloads`),
  KEY `downloadauthor` (`author`),
  KEY `dds` (`submitter`),
  KEY `ddl` (`download_licence`),
  KEY `dvalidated` (`validated`),
  KEY `ftjoin_dname` (`name`),
  KEY `ftjoin_ddescrip` (`description`),
  KEY `ftjoin_dadditional` (`additional_details`),
  FULLTEXT KEY `download_data_mash` (`download_data_mash`),
  FULLTEXT KEY `original_filename` (`original_filename`)
) ENGINE=MyISAM AUTO_INCREMENT=201 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_download_licences`;

CREATE TABLE `cms10_download_licences` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `l_title` varchar(255) NOT NULL,
  `l_text` longtext NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_download_logging`;

CREATE TABLE `cms10_download_logging` (
  `id` int(11) NOT NULL,
  `member_id` int(11) NOT NULL,
  `ip` varchar(40) NOT NULL,
  `date_and_time` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`,`member_id`),
  KEY `calculate_bandwidth` (`date_and_time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_edit_pings`;

CREATE TABLE `cms10_edit_pings` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `the_page` varchar(80) NOT NULL,
  `the_type` varchar(80) NOT NULL,
  `the_id` varchar(80) NOT NULL,
  `the_time` int(10) unsigned NOT NULL,
  `the_member` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `edit_pings_on` (`the_page`,`the_type`,`the_id`)
) ENGINE=MyISAM AUTO_INCREMENT=197 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_email_bounces`;

CREATE TABLE `cms10_email_bounces` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `b_email_address` varchar(255) NOT NULL,
  `b_time` int(10) unsigned NOT NULL,
  `b_subject` varchar(255) NOT NULL,
  `b_body` longtext NOT NULL,
  PRIMARY KEY (`id`),
  KEY `b_email_address` (`b_email_address`(250)),
  KEY `b_time` (`b_time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_f_custom_fields`;

CREATE TABLE `cms10_f_custom_fields` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cf_locked` tinyint(1) NOT NULL,
  `cf_name` int(10) unsigned NOT NULL,
  `cf_description` int(10) unsigned NOT NULL,
  `cf_default` longtext NOT NULL,
  `cf_public_view` tinyint(1) NOT NULL,
  `cf_owner_view` tinyint(1) NOT NULL,
  `cf_owner_set` tinyint(1) NOT NULL,
  `cf_type` varchar(80) NOT NULL,
  `cf_required` tinyint(1) NOT NULL,
  `cf_show_in_posts` tinyint(1) NOT NULL,
  `cf_show_in_post_previews` tinyint(1) NOT NULL,
  `cf_order` int(11) NOT NULL,
  `cf_only_group` longtext NOT NULL,
  `cf_encrypted` tinyint(1) NOT NULL,
  `cf_show_on_join_form` tinyint(1) NOT NULL,
  `cf_options` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=45 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_f_emoticons`;

CREATE TABLE `cms10_f_emoticons` (
  `e_code` varchar(80) NOT NULL,
  `e_theme_img_code` varchar(255) NOT NULL,
  `e_relevance_level` int(11) NOT NULL,
  `e_use_topics` tinyint(1) NOT NULL,
  `e_is_special` tinyint(1) NOT NULL,
  PRIMARY KEY (`e_code`),
  KEY `relevantemoticons` (`e_relevance_level`),
  KEY `topicemos` (`e_use_topics`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_f_forum_groupings`;

CREATE TABLE `cms10_f_forum_groupings` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `c_title` varchar(255) NOT NULL,
  `c_description` longtext NOT NULL,
  `c_expanded_by_default` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_f_forum_intro_ip`;

CREATE TABLE `cms10_f_forum_intro_ip` (
  `i_forum_id` int(11) NOT NULL,
  `i_ip` varchar(40) NOT NULL,
  PRIMARY KEY (`i_forum_id`,`i_ip`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_f_forum_intro_member`;

CREATE TABLE `cms10_f_forum_intro_member` (
  `i_forum_id` int(11) NOT NULL,
  `i_member_id` int(11) NOT NULL,
  PRIMARY KEY (`i_forum_id`,`i_member_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_f_forums`;

CREATE TABLE `cms10_f_forums` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `f_name` varchar(255) NOT NULL,
  `f_description` int(11) NOT NULL,
  `f_forum_grouping_id` int(11) DEFAULT NULL,
  `f_parent_forum` int(11) DEFAULT NULL,
  `f_position` int(11) NOT NULL,
  `f_order_sub_alpha` tinyint(1) NOT NULL,
  `f_post_count_increment` tinyint(1) NOT NULL,
  `f_intro_question` int(11) NOT NULL,
  `f_intro_answer` varchar(255) NOT NULL,
  `f_cache_num_topics` int(11) NOT NULL,
  `f_cache_num_posts` int(11) NOT NULL,
  `f_cache_last_topic_id` int(11) DEFAULT NULL,
  `f_cache_last_title` varchar(255) NOT NULL,
  `f_cache_last_time` int(10) unsigned DEFAULT NULL,
  `f_cache_last_username` varchar(255) NOT NULL,
  `f_cache_last_member_id` int(11) DEFAULT NULL,
  `f_cache_last_forum_id` int(11) DEFAULT NULL,
  `f_redirection` varchar(255) NOT NULL,
  `f_order` varchar(80) NOT NULL,
  `f_is_threaded` tinyint(1) NOT NULL,
  `f_allows_anonymous_posts` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `cache_num_posts` (`f_cache_num_posts`),
  KEY `subforum_parenting` (`f_parent_forum`),
  KEY `findnamedforum` (`f_name`(250)),
  KEY `f_position` (`f_position`)
) ENGINE=MyISAM AUTO_INCREMENT=201 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_f_group_join_log`;

CREATE TABLE `cms10_f_group_join_log` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `member_id` int(11) NOT NULL,
  `usergroup_id` int(11) DEFAULT NULL,
  `join_time` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `member_id` (`member_id`),
  KEY `usergroup_id` (`usergroup_id`),
  KEY `join_time` (`join_time`)
) ENGINE=MyISAM AUTO_INCREMENT=201 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_f_group_member_timeouts`;

CREATE TABLE `cms10_f_group_member_timeouts` (
  `member_id` int(11) NOT NULL,
  `group_id` int(11) NOT NULL,
  `timeout` int(10) unsigned NOT NULL,
  PRIMARY KEY (`member_id`,`group_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_f_group_members`;

CREATE TABLE `cms10_f_group_members` (
  `gm_group_id` int(11) NOT NULL,
  `gm_member_id` int(11) NOT NULL,
  `gm_validated` tinyint(1) NOT NULL,
  PRIMARY KEY (`gm_group_id`,`gm_member_id`),
  KEY `gm_validated` (`gm_validated`),
  KEY `gm_member_id` (`gm_member_id`),
  KEY `gm_group_id` (`gm_group_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_f_groups`;

CREATE TABLE `cms10_f_groups` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `g_name` int(10) unsigned NOT NULL,
  `g_is_default` tinyint(1) NOT NULL,
  `g_is_presented_at_install` tinyint(1) NOT NULL,
  `g_is_super_admin` tinyint(1) NOT NULL,
  `g_is_super_moderator` tinyint(1) NOT NULL,
  `g_group_leader` int(11) DEFAULT NULL,
  `g_title` int(10) unsigned NOT NULL,
  `g_promotion_target` int(11) DEFAULT NULL,
  `g_promotion_threshold` int(11) DEFAULT NULL,
  `g_flood_control_submit_secs` int(11) NOT NULL,
  `g_flood_control_access_secs` int(11) NOT NULL,
  `g_gift_points_base` int(11) NOT NULL,
  `g_gift_points_per_day` int(11) NOT NULL,
  `g_max_daily_upload_mb` int(11) NOT NULL,
  `g_max_attachments_per_post` int(11) NOT NULL,
  `g_max_avatar_width` int(11) NOT NULL,
  `g_max_avatar_height` int(11) NOT NULL,
  `g_max_post_length_comcode` int(11) NOT NULL,
  `g_max_sig_length_comcode` int(11) NOT NULL,
  `g_enquire_on_new_ips` tinyint(1) NOT NULL,
  `g_rank_image` varchar(80) NOT NULL,
  `g_hidden` tinyint(1) NOT NULL,
  `g_order` int(11) NOT NULL,
  `g_rank_image_pri_only` tinyint(1) NOT NULL,
  `g_open_membership` tinyint(1) NOT NULL,
  `g_is_private_club` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `ftjoin_gname` (`g_name`),
  KEY `ftjoin_gtitle` (`g_title`),
  KEY `is_private_club` (`g_is_private_club`),
  KEY `is_super_admin` (`g_is_super_admin`),
  KEY `is_super_moderator` (`g_is_super_moderator`),
  KEY `is_default` (`g_is_default`),
  KEY `hidden` (`g_hidden`),
  KEY `is_presented_at_install` (`g_is_presented_at_install`),
  KEY `gorder` (`g_order`,`id`)
) ENGINE=MyISAM AUTO_INCREMENT=201 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_f_invites`;

CREATE TABLE `cms10_f_invites` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `i_inviter` int(11) NOT NULL,
  `i_email_address` varchar(255) NOT NULL,
  `i_time` int(10) unsigned NOT NULL,
  `i_taken` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_f_member_cpf_perms`;

CREATE TABLE `cms10_f_member_cpf_perms` (
  `member_id` int(11) NOT NULL,
  `field_id` int(11) NOT NULL,
  `guest_view` tinyint(1) NOT NULL,
  `member_view` tinyint(1) NOT NULL,
  `friend_view` tinyint(1) NOT NULL,
  `group_view` varchar(255) NOT NULL,
  PRIMARY KEY (`member_id`,`field_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_f_member_custom_fields`;

CREATE TABLE `cms10_f_member_custom_fields` (
  `mf_member_id` int(11) NOT NULL,
  `field_1` int(11) NOT NULL DEFAULT '0',
  `field_2` int(11) NOT NULL DEFAULT '0',
  `field_3` varchar(255) NOT NULL DEFAULT '',
  `field_4` int(11) NOT NULL DEFAULT '0',
  `field_5` varchar(255) NOT NULL DEFAULT '',
  `field_6` varchar(255) NOT NULL DEFAULT '',
  `field_7` varchar(255) NOT NULL DEFAULT '',
  `field_8` varchar(255) NOT NULL DEFAULT '',
  `field_9` int(11) DEFAULT '0',
  `field_10` int(11) DEFAULT NULL,
  `field_11` longtext NOT NULL,
  `field_12` longtext NOT NULL,
  `field_13` longtext NOT NULL,
  `field_14` longtext NOT NULL,
  `field_15` longtext NOT NULL,
  `field_16` int(11) DEFAULT '0',
  `field_17` int(11) DEFAULT '0',
  `field_18` int(11) DEFAULT '0',
  `field_19` int(11) DEFAULT '0',
  `field_20` int(11) DEFAULT '0',
  `field_21` int(11) DEFAULT '0',
  `field_22` int(11) DEFAULT '0',
  `field_23` longtext NOT NULL,
  `field_24` longtext NOT NULL,
  `field_25` longtext NOT NULL,
  `field_26` int(11) DEFAULT NULL,
  `field_27` longtext NOT NULL,
  `field_28` longtext NOT NULL,
  `field_29` longtext NOT NULL,
  `field_30` longtext NOT NULL,
  `field_31` varchar(255) NOT NULL DEFAULT '',
  `field_32` varchar(255) NOT NULL DEFAULT '',
  `field_33` int(11) DEFAULT '0',
  `field_34` double DEFAULT NULL,
  `field_35` double DEFAULT NULL,
  `field_36` longtext NOT NULL,
  `field_37` varchar(255) NOT NULL DEFAULT '',
  `field_38` varchar(255) NOT NULL DEFAULT '',
  `field_39` varchar(255) NOT NULL DEFAULT '',
  `field_40` varchar(255) NOT NULL DEFAULT '',
  `field_41` longtext NOT NULL,
  `field_42` varchar(255) NOT NULL DEFAULT '',
  `field_43` varchar(255) NOT NULL DEFAULT '',
  `field_44` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`mf_member_id`),
  KEY `mcf1` (`field_1`),
  KEY `mcf2` (`field_2`),
  KEY `mcf3` (`field_3`(250)),
  KEY `mcf4` (`field_4`),
  KEY `mcf5` (`field_5`(250)),
  KEY `mcf6` (`field_6`(250)),
  KEY `mcf7` (`field_7`(250)),
  KEY `mcf8` (`field_8`(250)),
  KEY `mcf10` (`field_10`),
  KEY `mcf16` (`field_16`),
  KEY `mcf17` (`field_17`),
  KEY `mcf18` (`field_18`),
  KEY `mcf19` (`field_19`),
  KEY `mcf20` (`field_20`),
  KEY `mcf21` (`field_21`),
  KEY `mcf22` (`field_22`),
  KEY `mcf26` (`field_26`),
  KEY `mcf31` (`field_31`(250)),
  KEY `mcf32` (`field_32`(250)),
  KEY `mcf33` (`field_33`),
  KEY `mcf37` (`field_37`(250)),
  KEY `mcf38` (`field_38`(250)),
  KEY `mcf39` (`field_39`(250)),
  KEY `mcf40` (`field_40`(250)),
  KEY `mcf42` (`field_42`(250)),
  KEY `mcf43` (`field_43`(250)),
  KEY `mcf44` (`field_44`(250)),
  FULLTEXT KEY `mcf_ft_3` (`field_3`),
  FULLTEXT KEY `mcf_ft_5` (`field_5`),
  FULLTEXT KEY `mcf_ft_6` (`field_6`),
  FULLTEXT KEY `mcf_ft_7` (`field_7`),
  FULLTEXT KEY `mcf_ft_8` (`field_8`),
  FULLTEXT KEY `mcf_ft_11` (`field_11`),
  FULLTEXT KEY `mcf_ft_12` (`field_12`),
  FULLTEXT KEY `mcf_ft_13` (`field_13`),
  FULLTEXT KEY `mcf_ft_14` (`field_14`),
  FULLTEXT KEY `mcf_ft_15` (`field_15`),
  FULLTEXT KEY `mcf_ft_23` (`field_23`),
  FULLTEXT KEY `mcf_ft_24` (`field_24`),
  FULLTEXT KEY `mcf_ft_25` (`field_25`),
  FULLTEXT KEY `mcf_ft_27` (`field_27`),
  FULLTEXT KEY `mcf_ft_28` (`field_28`),
  FULLTEXT KEY `mcf_ft_29` (`field_29`),
  FULLTEXT KEY `mcf_ft_30` (`field_30`),
  FULLTEXT KEY `mcf_ft_31` (`field_31`),
  FULLTEXT KEY `mcf_ft_32` (`field_32`),
  FULLTEXT KEY `mcf_ft_36` (`field_36`),
  FULLTEXT KEY `mcf_ft_37` (`field_37`),
  FULLTEXT KEY `mcf_ft_38` (`field_38`),
  FULLTEXT KEY `mcf_ft_39` (`field_39`),
  FULLTEXT KEY `mcf_ft_40` (`field_40`),
  FULLTEXT KEY `mcf_ft_41` (`field_41`),
  FULLTEXT KEY `mcf_ft_42` (`field_42`),
  FULLTEXT KEY `mcf_ft_43` (`field_43`),
  FULLTEXT KEY `mcf_ft_44` (`field_44`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_f_member_known_login_ips`;

CREATE TABLE `cms10_f_member_known_login_ips` (
  `i_member_id` int(11) NOT NULL,
  `i_ip` varchar(40) NOT NULL,
  `i_val_code` varchar(255) NOT NULL,
  PRIMARY KEY (`i_member_id`,`i_ip`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_f_members`;

CREATE TABLE `cms10_f_members` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `m_username` varchar(80) NOT NULL,
  `m_pass_hash_salted` varchar(255) NOT NULL,
  `m_pass_salt` varchar(255) NOT NULL,
  `m_theme` varchar(80) NOT NULL,
  `m_avatar_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `m_validated` tinyint(1) NOT NULL,
  `m_validated_email_confirm_code` varchar(255) NOT NULL,
  `m_cache_num_posts` int(11) NOT NULL,
  `m_cache_warnings` int(11) NOT NULL,
  `m_join_time` int(10) unsigned NOT NULL,
  `m_timezone_offset` varchar(255) NOT NULL,
  `m_primary_group` int(11) NOT NULL,
  `m_last_visit_time` int(10) unsigned NOT NULL,
  `m_last_submit_time` int(10) unsigned NOT NULL,
  `m_signature` int(11) NOT NULL,
  `m_is_perm_banned` tinyint(1) NOT NULL,
  `m_preview_posts` tinyint(1) NOT NULL,
  `m_dob_day` tinyint(4) DEFAULT NULL,
  `m_dob_month` tinyint(4) DEFAULT NULL,
  `m_dob_year` int(11) DEFAULT NULL,
  `m_reveal_age` tinyint(1) NOT NULL,
  `m_email_address` varchar(255) NOT NULL,
  `m_title` varchar(255) NOT NULL,
  `m_photo_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `m_photo_thumb_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `m_views_signatures` tinyint(1) NOT NULL,
  `m_auto_monitor_contrib_content` tinyint(1) NOT NULL,
  `m_language` varchar(80) NOT NULL,
  `m_ip_address` varchar(40) NOT NULL,
  `m_allow_emails` tinyint(1) NOT NULL,
  `m_allow_emails_from_staff` tinyint(1) NOT NULL,
  `m_highlighted_name` tinyint(1) NOT NULL,
  `m_pt_allow` varchar(255) NOT NULL,
  `m_pt_rules_text` int(11) NOT NULL,
  `m_max_email_attach_size_mb` int(11) NOT NULL,
  `m_password_change_code` varchar(255) NOT NULL,
  `m_password_compat_scheme` varchar(80) NOT NULL,
  `m_on_probation_until` int(10) unsigned DEFAULT NULL,
  `m_profile_views` int(10) unsigned NOT NULL,
  `m_total_sessions` int(10) unsigned NOT NULL,
  `m_auto_mark_read` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `user_list` (`m_username`),
  KEY `menail` (`m_email_address`(250)),
  KEY `external_auth_lookup` (`m_pass_hash_salted`(250)),
  KEY `sort_post_count` (`m_cache_num_posts`),
  KEY `m_join_time` (`m_join_time`),
  KEY `whos_validated` (`m_validated`),
  KEY `birthdays` (`m_dob_day`,`m_dob_month`),
  KEY `ftjoin_msig` (`m_signature`),
  KEY `primary_group` (`m_primary_group`),
  KEY `avatar_url` (`m_avatar_url`(250)),
  KEY `last_visit_time` (`m_dob_month`,`m_dob_day`,`m_last_visit_time`),
  FULLTEXT KEY `search_user` (`m_username`)
) ENGINE=MyISAM AUTO_INCREMENT=201 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_f_moderator_logs`;

CREATE TABLE `cms10_f_moderator_logs` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `l_the_type` varchar(80) NOT NULL,
  `l_param_a` varchar(255) NOT NULL,
  `l_param_b` varchar(255) NOT NULL,
  `l_date_and_time` int(10) unsigned NOT NULL,
  `l_reason` longtext NOT NULL,
  `l_by` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_f_multi_moderations`;

CREATE TABLE `cms10_f_multi_moderations` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `mm_name` int(10) unsigned NOT NULL,
  `mm_post_text` longtext NOT NULL,
  `mm_move_to` int(11) DEFAULT NULL,
  `mm_pin_state` tinyint(1) DEFAULT NULL,
  `mm_sink_state` tinyint(1) DEFAULT NULL,
  `mm_open_state` tinyint(1) DEFAULT NULL,
  `mm_forum_multi_code` varchar(255) NOT NULL,
  `mm_title_suffix` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_f_password_history`;

CREATE TABLE `cms10_f_password_history` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `p_member_id` int(11) NOT NULL,
  `p_hash_salted` varchar(255) NOT NULL,
  `p_salt` varchar(255) NOT NULL,
  `p_time` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `p_member_id` (`p_member_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_f_poll_answers`;

CREATE TABLE `cms10_f_poll_answers` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `pa_poll_id` int(11) NOT NULL,
  `pa_answer` varchar(255) NOT NULL,
  `pa_cache_num_votes` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_f_poll_votes`;

CREATE TABLE `cms10_f_poll_votes` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `pv_poll_id` int(11) NOT NULL,
  `pv_member_id` int(11) NOT NULL,
  `pv_answer_id` int(11) NOT NULL,
  `pv_ip` varchar(40) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_f_polls`;

CREATE TABLE `cms10_f_polls` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `po_question` varchar(255) NOT NULL,
  `po_cache_total_votes` int(11) NOT NULL,
  `po_is_private` tinyint(1) NOT NULL,
  `po_is_open` tinyint(1) NOT NULL,
  `po_minimum_selections` int(11) NOT NULL,
  `po_maximum_selections` int(11) NOT NULL,
  `po_requires_reply` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_f_post_templates`;

CREATE TABLE `cms10_f_post_templates` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `t_title` varchar(255) NOT NULL,
  `t_text` longtext NOT NULL,
  `t_forum_multi_code` varchar(255) NOT NULL,
  `t_use_default_forums` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_f_posts`;

CREATE TABLE `cms10_f_posts` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `p_title` varchar(255) NOT NULL,
  `p_post` int(11) NOT NULL,
  `p_ip_address` varchar(40) NOT NULL,
  `p_time` int(10) unsigned NOT NULL,
  `p_poster` int(11) NOT NULL,
  `p_intended_solely_for` int(11) DEFAULT NULL,
  `p_poster_name_if_guest` varchar(80) NOT NULL,
  `p_validated` tinyint(1) NOT NULL,
  `p_topic_id` int(11) NOT NULL,
  `p_cache_forum_id` int(11) DEFAULT NULL,
  `p_last_edit_time` int(10) unsigned DEFAULT NULL,
  `p_last_edit_by` int(11) DEFAULT NULL,
  `p_is_emphasised` tinyint(1) NOT NULL,
  `p_skip_sig` tinyint(1) NOT NULL,
  `p_parent_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `p_validated` (`p_validated`),
  KEY `in_topic` (`p_topic_id`,`p_time`,`id`),
  KEY `post_order_time` (`p_time`,`id`),
  KEY `posts_since` (`p_time`,`p_cache_forum_id`),
  KEY `p_last_edit_time` (`p_last_edit_time`),
  KEY `find_pp` (`p_intended_solely_for`),
  KEY `search_join` (`p_post`),
  KEY `postsinforum` (`p_cache_forum_id`),
  KEY `deletebyip` (`p_ip_address`),
  KEY `posts_by_in_forum` (`p_poster`,`p_cache_forum_id`),
  KEY `posts_by_in_topic` (`p_poster`,`p_topic_id`),
  KEY `posts_by` (`p_poster`,`p_time`),
  KEY `in_topic_change_order` (`p_topic_id`,`p_last_edit_time`,`p_time`,`id`),
  FULLTEXT KEY `p_title` (`p_title`)
) ENGINE=MyISAM AUTO_INCREMENT=667 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_f_read_logs`;

CREATE TABLE `cms10_f_read_logs` (
  `l_member_id` int(11) NOT NULL,
  `l_topic_id` int(11) NOT NULL,
  `l_time` int(10) unsigned NOT NULL,
  PRIMARY KEY (`l_member_id`,`l_topic_id`),
  KEY `erase_old_read_logs` (`l_time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_f_saved_warnings`;

CREATE TABLE `cms10_f_saved_warnings` (
  `s_title` varchar(255) NOT NULL,
  `s_explanation` longtext NOT NULL,
  `s_message` longtext NOT NULL,
  PRIMARY KEY (`s_title`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `cms10_f_special_pt_access`;

CREATE TABLE `cms10_f_special_pt_access` (
  `s_member_id` int(11) NOT NULL,
  `s_topic_id` int(11) NOT NULL,
  PRIMARY KEY (`s_member_id`,`s_topic_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_f_topics`;

CREATE TABLE `cms10_f_topics` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `t_pinned` tinyint(1) NOT NULL,
  `t_sunk` tinyint(1) NOT NULL,
  `t_cascading` tinyint(1) NOT NULL,
  `t_forum_id` int(11) DEFAULT NULL,
  `t_pt_from` int(11) DEFAULT NULL,
  `t_pt_to` int(11) DEFAULT NULL,
  `t_pt_from_category` varchar(255) NOT NULL,
  `t_pt_to_category` varchar(255) NOT NULL,
  `t_description` varchar(255) NOT NULL,
  `t_description_link` varchar(255) NOT NULL,
  `t_emoticon` varchar(255) NOT NULL,
  `t_num_views` int(11) NOT NULL,
  `t_validated` tinyint(1) NOT NULL,
  `t_is_open` tinyint(1) NOT NULL,
  `t_poll_id` int(11) DEFAULT NULL,
  `t_cache_first_post_id` int(11) DEFAULT NULL,
  `t_cache_first_time` int(10) unsigned DEFAULT NULL,
  `t_cache_first_title` varchar(255) NOT NULL,
  `t_cache_first_post` int(11) DEFAULT NULL,
  `t_cache_first_username` varchar(80) NOT NULL,
  `t_cache_first_member_id` int(11) DEFAULT NULL,
  `t_cache_last_post_id` int(11) DEFAULT NULL,
  `t_cache_last_time` int(10) unsigned DEFAULT NULL,
  `t_cache_last_title` varchar(255) NOT NULL,
  `t_cache_last_username` varchar(80) NOT NULL,
  `t_cache_last_member_id` int(11) DEFAULT NULL,
  `t_cache_num_posts` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `t_num_views` (`t_num_views`),
  KEY `t_pt_to` (`t_pt_to`),
  KEY `t_pt_from` (`t_pt_from`),
  KEY `t_validated` (`t_validated`),
  KEY `in_forum` (`t_forum_id`),
  KEY `topic_order_time` (`t_cache_last_time`),
  KEY `topic_order_time_2` (`t_cache_first_time`),
  KEY `descriptionsearch` (`t_description`(250)),
  KEY `forumlayer` (`t_cache_first_title`(250)),
  KEY `t_cascading` (`t_cascading`),
  KEY `t_cascading_or_forum` (`t_cascading`,`t_forum_id`),
  KEY `topic_order` (`t_cascading`,`t_pinned`,`t_cache_last_time`),
  KEY `topic_order_2` (`t_forum_id`,`t_cascading`,`t_pinned`,`t_sunk`,`t_cache_last_time`),
  KEY `topic_order_3` (`t_forum_id`,`t_cascading`,`t_pinned`,`t_cache_last_time`),
  KEY `ownedtopics` (`t_cache_first_member_id`),
  KEY `unread_forums` (`t_forum_id`,`t_cache_last_time`),
  KEY `t_cache_num_posts` (`t_cache_num_posts`),
  KEY `t_cache_last_member_id` (`t_cache_last_member_id`),
  KEY `t_cache_first_post_id` (`t_cache_first_post_id`),
  KEY `t_cache_last_post_id` (`t_cache_last_post_id`),
  FULLTEXT KEY `t_description` (`t_description`)
) ENGINE=MyISAM AUTO_INCREMENT=302 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_f_usergroup_sub_mails`;

CREATE TABLE `cms10_f_usergroup_sub_mails` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `m_usergroup_sub_id` int(11) NOT NULL,
  `m_ref_point` varchar(80) NOT NULL,
  `m_ref_point_offset` int(11) NOT NULL,
  `m_subject` int(10) unsigned NOT NULL,
  `m_body` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_f_usergroup_subs`;

CREATE TABLE `cms10_f_usergroup_subs` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `s_title` int(10) unsigned NOT NULL,
  `s_description` int(11) NOT NULL,
  `s_cost` varchar(255) NOT NULL,
  `s_length` int(11) NOT NULL,
  `s_length_units` varchar(255) NOT NULL,
  `s_auto_recur` tinyint(1) NOT NULL,
  `s_group_id` int(11) NOT NULL,
  `s_enabled` tinyint(1) NOT NULL,
  `s_mail_start` int(10) unsigned NOT NULL,
  `s_mail_end` int(10) unsigned NOT NULL,
  `s_mail_uhoh` int(10) unsigned NOT NULL,
  `s_uses_primary` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_f_warnings`;

CREATE TABLE `cms10_f_warnings` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `w_member_id` int(11) NOT NULL,
  `w_time` int(10) unsigned NOT NULL,
  `w_explanation` longtext NOT NULL,
  `w_by` int(11) NOT NULL,
  `w_is_warning` tinyint(1) NOT NULL,
  `p_silence_from_topic` int(11) DEFAULT NULL,
  `p_silence_from_forum` int(11) DEFAULT NULL,
  `p_probation` int(11) NOT NULL,
  `p_banned_ip` varchar(40) NOT NULL,
  `p_charged_points` int(11) NOT NULL,
  `p_banned_member` tinyint(1) NOT NULL,
  `p_changed_usergroup_from` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `warningsmemberid` (`w_member_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_f_welcome_emails`;

CREATE TABLE `cms10_f_welcome_emails` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `w_name` varchar(255) NOT NULL,
  `w_subject` int(10) unsigned NOT NULL,
  `w_text` int(10) unsigned NOT NULL,
  `w_send_time` int(11) NOT NULL,
  `w_newsletter` int(11) DEFAULT NULL,
  `w_usergroup` int(11) DEFAULT NULL,
  `w_usergroup_type` varchar(80) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_failedlogins`;

CREATE TABLE `cms10_failedlogins` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `failed_account` varchar(80) NOT NULL,
  `date_and_time` int(10) unsigned NOT NULL,
  `ip` varchar(40) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `failedlogins_by_ip` (`ip`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_feature_lifetime_monitor`;

CREATE TABLE `cms10_feature_lifetime_monitor` (
  `content_id` varchar(80) NOT NULL,
  `block_cache_id` varchar(80) NOT NULL,
  `run_period` int(11) NOT NULL,
  `running_now` tinyint(1) NOT NULL,
  `last_update` int(10) unsigned NOT NULL,
  PRIMARY KEY (`content_id`,`block_cache_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_filedump`;

CREATE TABLE `cms10_filedump` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(80) NOT NULL,
  `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `description` int(10) unsigned NOT NULL,
  `the_member` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_galleries`;

CREATE TABLE `cms10_galleries` (
  `name` varchar(80) NOT NULL,
  `description` int(11) NOT NULL,
  `fullname` int(11) NOT NULL,
  `add_date` int(10) unsigned NOT NULL,
  `rep_image` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `parent_id` varchar(80) NOT NULL,
  `watermark_top_left` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `watermark_top_right` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `watermark_bottom_left` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `watermark_bottom_right` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `accept_images` tinyint(1) NOT NULL,
  `accept_videos` tinyint(1) NOT NULL,
  `allow_rating` tinyint(1) NOT NULL,
  `allow_comments` tinyint(4) NOT NULL,
  `notes` longtext NOT NULL,
  `is_member_synched` tinyint(1) NOT NULL,
  `flow_mode_interface` tinyint(1) NOT NULL,
  `gallery_views` int(11) NOT NULL,
  `g_owner` int(11) DEFAULT NULL,
  PRIMARY KEY (`name`),
  KEY `watermark_top_left` (`watermark_top_left`(250)),
  KEY `watermark_top_right` (`watermark_top_right`(250)),
  KEY `watermark_bottom_left` (`watermark_bottom_left`(250)),
  KEY `watermark_bottom_right` (`watermark_bottom_right`(250)),
  KEY `gadd_date` (`add_date`),
  KEY `parent_id` (`parent_id`),
  KEY `ftjoin_gfullname` (`fullname`),
  KEY `ftjoin_gdescrip` (`description`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_giftr`;

CREATE TABLE `cms10_giftr` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `image` varchar(255) NOT NULL,
  `price` int(11) NOT NULL,
  `enabled` tinyint(1) NOT NULL,
  `category` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_gifts`;

CREATE TABLE `cms10_gifts` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `date_and_time` int(10) unsigned NOT NULL,
  `amount` int(11) NOT NULL,
  `gift_from` int(11) NOT NULL,
  `gift_to` int(11) NOT NULL,
  `reason` int(11) NOT NULL,
  `anonymous` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `giftsgiven` (`gift_from`),
  KEY `giftsreceived` (`gift_to`)
) ENGINE=MyISAM AUTO_INCREMENT=201 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_group_category_access`;

CREATE TABLE `cms10_group_category_access` (
  `module_the_name` varchar(80) NOT NULL,
  `category_name` varchar(80) NOT NULL,
  `group_id` int(11) NOT NULL,
  PRIMARY KEY (`module_the_name`,`category_name`,`group_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_group_page_access`;

CREATE TABLE `cms10_group_page_access` (
  `page_name` varchar(80) NOT NULL,
  `zone_name` varchar(80) NOT NULL,
  `group_id` int(11) NOT NULL,
  PRIMARY KEY (`page_name`,`zone_name`,`group_id`),
  KEY `group_id` (`group_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_group_points`;

CREATE TABLE `cms10_group_points` (
  `p_group_id` int(11) NOT NULL,
  `p_points_one_off` int(11) NOT NULL,
  `p_points_per_month` int(11) NOT NULL,
  PRIMARY KEY (`p_group_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_group_privileges`;

CREATE TABLE `cms10_group_privileges` (
  `group_id` int(11) NOT NULL,
  `privilege` varchar(80) NOT NULL,
  `the_page` varchar(80) NOT NULL,
  `module_the_name` varchar(80) NOT NULL,
  `category_name` varchar(80) NOT NULL,
  `the_value` tinyint(1) NOT NULL,
  PRIMARY KEY (`group_id`,`privilege`,`the_page`,`module_the_name`,`category_name`),
  KEY `group_id` (`group_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `cms10_group_zone_access`;

CREATE TABLE `cms10_group_zone_access` (
  `zone_name` varchar(80) NOT NULL,
  `group_id` int(11) NOT NULL,
  PRIMARY KEY (`zone_name`,`group_id`),
  KEY `group_id` (`group_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_hackattack`;

CREATE TABLE `cms10_hackattack` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `data_post` longtext NOT NULL,
  `user_agent` varchar(255) NOT NULL,
  `referer` varchar(255) NOT NULL,
  `user_os` varchar(255) NOT NULL,
  `member_id` int(11) NOT NULL,
  `date_and_time` int(10) unsigned NOT NULL,
  `ip` varchar(40) NOT NULL,
  `reason` varchar(80) NOT NULL,
  `reason_param_a` varchar(255) NOT NULL,
  `reason_param_b` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `otherhacksby` (`ip`),
  KEY `h_date_and_time` (`date_and_time`)
) ENGINE=MyISAM AUTO_INCREMENT=201 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_https_pages`;

CREATE TABLE `cms10_https_pages` (
  `https_page_name` varchar(80) NOT NULL,
  PRIMARY KEY (`https_page_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_images`;

CREATE TABLE `cms10_images` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cat` varchar(80) NOT NULL,
  `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `thumb_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `description` int(11) NOT NULL,
  `allow_rating` tinyint(1) NOT NULL,
  `allow_comments` tinyint(4) NOT NULL,
  `allow_trackbacks` tinyint(1) NOT NULL,
  `notes` longtext NOT NULL,
  `submitter` int(11) NOT NULL,
  `validated` tinyint(1) NOT NULL,
  `add_date` int(10) unsigned NOT NULL,
  `edit_date` int(10) unsigned DEFAULT NULL,
  `image_views` int(11) NOT NULL,
  `title` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `image_views` (`image_views`),
  KEY `category_list` (`cat`),
  KEY `i_validated` (`validated`),
  KEY `xis` (`submitter`),
  KEY `iadd_date` (`add_date`),
  KEY `ftjoin_dtitle` (`title`),
  KEY `ftjoin_idescription` (`description`)
) ENGINE=MyISAM AUTO_INCREMENT=201 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_import_id_remap`;

CREATE TABLE `cms10_import_id_remap` (
  `id_old` varchar(80) NOT NULL,
  `id_new` int(11) NOT NULL,
  `id_type` varchar(80) NOT NULL,
  `id_session` varchar(80) NOT NULL,
  PRIMARY KEY (`id_old`,`id_type`,`id_session`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_import_parts_done`;

CREATE TABLE `cms10_import_parts_done` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `imp_id` varchar(255) NOT NULL,
  `imp_session` varchar(80) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_import_session`;

CREATE TABLE `cms10_import_session` (
  `imp_session` varchar(80) NOT NULL,
  `imp_old_base_dir` varchar(255) NOT NULL,
  `imp_db_name` varchar(80) NOT NULL,
  `imp_db_user` varchar(80) NOT NULL,
  `imp_hook` varchar(80) NOT NULL,
  `imp_db_table_prefix` varchar(80) NOT NULL,
  `imp_db_host` varchar(80) NOT NULL,
  `imp_refresh_time` int(11) NOT NULL,
  PRIMARY KEY (`imp_session`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_incoming_uploads`;

CREATE TABLE `cms10_incoming_uploads` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `i_submitter` int(11) NOT NULL,
  `i_date_and_time` int(10) unsigned NOT NULL,
  `i_orig_filename` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `i_save_url` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_invoices`;

CREATE TABLE `cms10_invoices` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `i_type_code` varchar(80) NOT NULL,
  `i_member_id` int(11) NOT NULL,
  `i_state` varchar(80) NOT NULL,
  `i_amount` varchar(255) NOT NULL,
  `i_special` varchar(255) NOT NULL,
  `i_time` int(10) unsigned NOT NULL,
  `i_note` longtext NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_iotd`;

CREATE TABLE `cms10_iotd` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `i_title` int(11) NOT NULL,
  `caption` int(11) NOT NULL,
  `thumb_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `is_current` tinyint(1) NOT NULL,
  `allow_rating` tinyint(1) NOT NULL,
  `allow_comments` tinyint(4) NOT NULL,
  `allow_trackbacks` tinyint(1) NOT NULL,
  `notes` longtext NOT NULL,
  `used` tinyint(1) NOT NULL,
  `date_and_time` int(10) unsigned DEFAULT NULL,
  `iotd_views` int(11) NOT NULL,
  `submitter` int(11) NOT NULL,
  `add_date` int(10) unsigned NOT NULL,
  `edit_date` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `iotd_views` (`iotd_views`),
  KEY `get_current` (`is_current`),
  KEY `ios` (`submitter`),
  KEY `iadd_date` (`add_date`),
  KEY `date_and_time` (`date_and_time`),
  KEY `ftjoin_icap` (`caption`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_ip_country`;

CREATE TABLE `cms10_ip_country` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `begin_num` int(10) unsigned NOT NULL,
  `end_num` int(10) unsigned NOT NULL,
  `country` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_leader_board`;

CREATE TABLE `cms10_leader_board` (
  `lb_member` int(11) NOT NULL,
  `lb_points` int(11) NOT NULL,
  `date_and_time` int(10) unsigned NOT NULL,
  PRIMARY KEY (`lb_member`,`date_and_time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_link_tracker`;

CREATE TABLE `cms10_link_tracker` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `c_date_and_time` int(10) unsigned NOT NULL,
  `c_member_id` int(11) NOT NULL,
  `c_ip_address` varchar(40) NOT NULL,
  `c_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  PRIMARY KEY (`id`),
  KEY `c_url` (`c_url`(250))
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_locations`;

CREATE TABLE `cms10_locations` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `l_place` varchar(255) NOT NULL,
  `l_type` varchar(80) NOT NULL,
  `l_continent` varchar(80) NOT NULL,
  `l_country` varchar(80) NOT NULL,
  `l_parent_1` varchar(80) NOT NULL,
  `l_parent_2` varchar(80) NOT NULL,
  `l_parent_3` varchar(80) NOT NULL,
  `l_population` int(11) DEFAULT NULL,
  `l_latitude` double DEFAULT NULL,
  `l_longitude` double DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `l_place` (`l_place`(250)),
  KEY `l_country` (`l_country`),
  KEY `l_latitude` (`l_latitude`),
  KEY `l_longitude` (`l_longitude`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_logged`;

CREATE TABLE `cms10_logged` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `website_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `website_name` varchar(255) NOT NULL,
  `is_registered` tinyint(1) NOT NULL,
  `log_key` int(11) NOT NULL,
  `expire` int(11) NOT NULL,
  `l_version` varchar(80) NOT NULL,
  `hittime` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_logged_mail_messages`;

CREATE TABLE `cms10_logged_mail_messages` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `m_subject` longtext NOT NULL,
  `m_message` longtext NOT NULL,
  `m_to_email` longtext NOT NULL,
  `m_extra_cc_addresses` longtext NOT NULL,
  `m_extra_bcc_addresses` longtext NOT NULL,
  `m_join_time` int(10) unsigned DEFAULT NULL,
  `m_to_name` longtext NOT NULL,
  `m_from_email` varchar(255) NOT NULL,
  `m_from_name` varchar(255) NOT NULL,
  `m_priority` tinyint(4) NOT NULL,
  `m_attachments` longtext NOT NULL,
  `m_no_cc` tinyint(1) NOT NULL,
  `m_as` int(11) NOT NULL,
  `m_as_admin` tinyint(1) NOT NULL,
  `m_in_html` tinyint(1) NOT NULL,
  `m_date_and_time` int(10) unsigned NOT NULL,
  `m_member_id` int(11) NOT NULL,
  `m_url` longtext NOT NULL,
  `m_queued` tinyint(1) NOT NULL,
  `m_template` varchar(80) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `recentmessages` (`m_date_and_time`),
  KEY `queued` (`m_queued`),
  KEY `combo` (`m_date_and_time`,`m_queued`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_match_key_messages`;

CREATE TABLE `cms10_match_key_messages` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `k_message` int(11) NOT NULL,
  `k_match_key` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_may_feature`;

CREATE TABLE `cms10_may_feature` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_member_category_access`;

CREATE TABLE `cms10_member_category_access` (
  `module_the_name` varchar(80) NOT NULL,
  `category_name` varchar(80) NOT NULL,
  `member_id` int(11) NOT NULL,
  `active_until` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`module_the_name`,`category_name`,`member_id`),
  KEY `mcaname` (`module_the_name`,`category_name`),
  KEY `mcamember_id` (`member_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_member_page_access`;

CREATE TABLE `cms10_member_page_access` (
  `page_name` varchar(80) NOT NULL,
  `zone_name` varchar(80) NOT NULL,
  `member_id` int(11) NOT NULL,
  `active_until` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`page_name`,`zone_name`,`member_id`),
  KEY `mzaname` (`page_name`,`zone_name`),
  KEY `mzamember_id` (`member_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_member_privileges`;

CREATE TABLE `cms10_member_privileges` (
  `member_id` int(11) NOT NULL,
  `privilege` varchar(80) NOT NULL,
  `the_page` varchar(80) NOT NULL,
  `module_the_name` varchar(80) NOT NULL,
  `category_name` varchar(80) NOT NULL,
  `the_value` tinyint(1) NOT NULL,
  `active_until` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`member_id`,`privilege`,`the_page`,`module_the_name`,`category_name`),
  KEY `member_privileges_name` (`privilege`,`the_page`,`module_the_name`,`category_name`),
  KEY `member_privileges_member` (`member_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `cms10_member_tracking`;

CREATE TABLE `cms10_member_tracking` (
  `mt_member_id` int(11) NOT NULL,
  `mt_cache_username` varchar(80) NOT NULL,
  `mt_time` int(10) unsigned NOT NULL,
  `mt_page` varchar(80) NOT NULL,
  `mt_type` varchar(80) NOT NULL,
  `mt_id` varchar(80) NOT NULL,
  PRIMARY KEY (`mt_member_id`,`mt_time`,`mt_page`,`mt_type`,`mt_id`),
  KEY `mt_page` (`mt_page`),
  KEY `mt_id` (`mt_page`,`mt_id`,`mt_type`),
  KEY `mt_time` (`mt_time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_member_zone_access`;

CREATE TABLE `cms10_member_zone_access` (
  `zone_name` varchar(80) NOT NULL,
  `member_id` int(11) NOT NULL,
  `active_until` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`zone_name`,`member_id`),
  KEY `mzazone_name` (`zone_name`),
  KEY `mzamember_id` (`member_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_members_diseases`;

CREATE TABLE `cms10_members_diseases` (
  `member_id` int(11) NOT NULL,
  `disease_id` int(11) NOT NULL,
  `sick` tinyint(1) NOT NULL,
  `cure` tinyint(1) NOT NULL,
  `immunisation` tinyint(1) NOT NULL,
  PRIMARY KEY (`member_id`,`disease_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_members_gifts`;

CREATE TABLE `cms10_members_gifts` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `to_member_id` int(11) NOT NULL,
  `from_member_id` int(11) NOT NULL,
  `gift_id` int(11) NOT NULL,
  `add_time` int(10) unsigned NOT NULL,
  `is_anonymous` tinyint(1) NOT NULL,
  `gift_message` longtext NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_members_mentors`;

CREATE TABLE `cms10_members_mentors` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `member_id` int(11) NOT NULL,
  `mentor_id` int(11) NOT NULL,
  PRIMARY KEY (`id`,`member_id`,`mentor_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_menu_items`;

CREATE TABLE `cms10_menu_items` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `i_menu` varchar(80) NOT NULL,
  `i_order` int(11) NOT NULL,
  `i_parent` int(11) DEFAULT NULL,
  `i_caption` int(11) NOT NULL,
  `i_caption_long` int(11) NOT NULL,
  `i_url` varchar(255) NOT NULL,
  `i_check_permissions` tinyint(1) NOT NULL,
  `i_expanded` tinyint(1) NOT NULL,
  `i_new_window` tinyint(1) NOT NULL,
  `i_include_sitemap` tinyint(4) NOT NULL,
  `i_page_only` varchar(80) NOT NULL,
  `i_theme_img_code` varchar(80) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `menu_extraction` (`i_menu`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_messages_to_render`;

CREATE TABLE `cms10_messages_to_render` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `r_session_id` varchar(80) NOT NULL,
  `r_message` longtext NOT NULL,
  `r_type` varchar(80) NOT NULL,
  `r_time` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `forsession` (`r_session_id`)
) ENGINE=MyISAM AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_modules`;

CREATE TABLE `cms10_modules` (
  `module_the_name` varchar(80) NOT NULL,
  `module_author` varchar(80) NOT NULL,
  `module_organisation` varchar(80) NOT NULL,
  `module_hacked_by` varchar(80) NOT NULL,
  `module_hack_version` int(11) DEFAULT NULL,
  `module_version` int(11) NOT NULL,
  PRIMARY KEY (`module_the_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_news`;

CREATE TABLE `cms10_news` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `date_and_time` int(10) unsigned NOT NULL,
  `title` int(11) NOT NULL,
  `news` int(11) NOT NULL,
  `news_article` int(11) NOT NULL,
  `allow_rating` tinyint(1) NOT NULL,
  `allow_comments` tinyint(4) NOT NULL,
  `allow_trackbacks` tinyint(1) NOT NULL,
  `notes` longtext NOT NULL,
  `author` varchar(80) NOT NULL,
  `submitter` int(11) NOT NULL,
  `validated` tinyint(1) NOT NULL,
  `edit_date` int(10) unsigned DEFAULT NULL,
  `news_category` int(11) NOT NULL,
  `news_views` int(11) NOT NULL,
  `news_image` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  PRIMARY KEY (`id`),
  KEY `news_views` (`news_views`),
  KEY `findnewscat` (`news_category`),
  KEY `newsauthor` (`author`),
  KEY `nes` (`submitter`),
  KEY `headlines` (`date_and_time`,`id`),
  KEY `nvalidated` (`validated`),
  KEY `ftjoin_ititle` (`title`),
  KEY `ftjoin_nnews` (`news`),
  KEY `ftjoin_nnewsa` (`news_article`)
) ENGINE=MyISAM AUTO_INCREMENT=201 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_news_categories`;

CREATE TABLE `cms10_news_categories` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `nc_title` int(10) unsigned NOT NULL,
  `nc_owner` int(11) DEFAULT NULL,
  `nc_img` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `notes` longtext NOT NULL,
  PRIMARY KEY (`id`),
  KEY `ncs` (`nc_owner`)
) ENGINE=MyISAM AUTO_INCREMENT=207 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_news_category_entries`;

CREATE TABLE `cms10_news_category_entries` (
  `news_entry` int(11) NOT NULL,
  `news_entry_category` int(11) NOT NULL,
  PRIMARY KEY (`news_entry`,`news_entry_category`),
  KEY `news_entry_category` (`news_entry_category`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_news_rss_cloud`;

CREATE TABLE `cms10_news_rss_cloud` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `rem_procedure` varchar(80) NOT NULL,
  `rem_port` int(11) NOT NULL,
  `rem_path` varchar(255) NOT NULL,
  `rem_protocol` varchar(80) NOT NULL,
  `rem_ip` varchar(40) NOT NULL,
  `watching_channel` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `register_time` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_newsletter_archive`;

CREATE TABLE `cms10_newsletter_archive` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `date_and_time` int(11) NOT NULL,
  `subject` varchar(255) NOT NULL,
  `newsletter` longtext NOT NULL,
  `language` varchar(80) NOT NULL,
  `importance_level` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_newsletter_drip_send`;

CREATE TABLE `cms10_newsletter_drip_send` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `d_inject_time` int(10) unsigned NOT NULL,
  `d_subject` varchar(255) NOT NULL,
  `d_message` longtext NOT NULL,
  `d_html_only` tinyint(1) NOT NULL,
  `d_to_email` varchar(255) NOT NULL,
  `d_to_name` varchar(255) NOT NULL,
  `d_from_email` varchar(255) NOT NULL,
  `d_from_name` varchar(255) NOT NULL,
  `d_priority` tinyint(4) NOT NULL,
  `d_template` varchar(80) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `d_inject_time` (`d_inject_time`),
  KEY `d_to_email` (`d_to_email`(250))
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_newsletter_periodic`;

CREATE TABLE `cms10_newsletter_periodic` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `np_message` longtext NOT NULL,
  `np_subject` longtext NOT NULL,
  `np_lang` varchar(5) NOT NULL,
  `np_send_details` longtext NOT NULL,
  `np_html_only` tinyint(1) NOT NULL,
  `np_from_email` varchar(255) NOT NULL,
  `np_from_name` varchar(255) NOT NULL,
  `np_priority` tinyint(4) NOT NULL,
  `np_csv_data` longtext NOT NULL,
  `np_frequency` varchar(255) NOT NULL,
  `np_day` tinyint(4) NOT NULL,
  `np_in_full` tinyint(1) NOT NULL,
  `np_template` varchar(80) NOT NULL,
  `np_last_sent` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_newsletter_subscribe`;

CREATE TABLE `cms10_newsletter_subscribe` (
  `newsletter_id` int(11) NOT NULL,
  `the_level` tinyint(4) NOT NULL,
  `email` varchar(255) NOT NULL,
  PRIMARY KEY (`newsletter_id`,`email`),
  KEY `peopletosendto` (`the_level`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `cms10_newsletter_subscribers`;

CREATE TABLE `cms10_newsletter_subscribers` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `email` varchar(255) NOT NULL,
  `join_time` int(10) unsigned NOT NULL,
  `code_confirm` int(11) NOT NULL,
  `the_password` varchar(255) NOT NULL,
  `pass_salt` varchar(80) NOT NULL,
  `language` varchar(80) NOT NULL,
  `n_forename` varchar(255) NOT NULL,
  `n_surname` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `welcomemails` (`join_time`),
  KEY `code_confirm` (`code_confirm`)
) ENGINE=MyISAM AUTO_INCREMENT=201 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_newsletters`;

CREATE TABLE `cms10_newsletters` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `title` int(10) unsigned NOT NULL,
  `description` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_notification_lockdown`;

CREATE TABLE `cms10_notification_lockdown` (
  `l_notification_code` varchar(80) NOT NULL,
  `l_setting` int(11) NOT NULL,
  PRIMARY KEY (`l_notification_code`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_notifications_enabled`;

CREATE TABLE `cms10_notifications_enabled` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `l_member_id` int(11) NOT NULL,
  `l_notification_code` varchar(80) NOT NULL,
  `l_code_category` varchar(255) NOT NULL,
  `l_setting` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `l_member_id` (`l_member_id`,`l_notification_code`),
  KEY `l_code_category` (`l_code_category`(250)),
  KEY `l_notification_code` (`l_notification_code`)
) ENGINE=MyISAM AUTO_INCREMENT=401 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_poll`;

CREATE TABLE `cms10_poll` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `question` int(11) NOT NULL,
  `option1` int(11) NOT NULL,
  `option2` int(11) NOT NULL,
  `option3` int(11) DEFAULT NULL,
  `option4` int(11) DEFAULT NULL,
  `option5` int(11) DEFAULT NULL,
  `option6` int(11) DEFAULT NULL,
  `option7` int(11) DEFAULT NULL,
  `option8` int(11) DEFAULT NULL,
  `option9` int(11) DEFAULT NULL,
  `option10` int(11) DEFAULT NULL,
  `votes1` int(11) NOT NULL,
  `votes2` int(11) NOT NULL,
  `votes3` int(11) NOT NULL,
  `votes4` int(11) NOT NULL,
  `votes5` int(11) NOT NULL,
  `votes6` int(11) NOT NULL,
  `votes7` int(11) NOT NULL,
  `votes8` int(11) NOT NULL,
  `votes9` int(11) NOT NULL,
  `votes10` int(11) NOT NULL,
  `allow_rating` tinyint(1) NOT NULL,
  `allow_comments` tinyint(4) NOT NULL,
  `allow_trackbacks` tinyint(1) NOT NULL,
  `notes` longtext NOT NULL,
  `num_options` tinyint(4) NOT NULL,
  `is_current` tinyint(1) NOT NULL,
  `date_and_time` int(10) unsigned DEFAULT NULL,
  `submitter` int(11) NOT NULL,
  `add_time` int(11) NOT NULL,
  `poll_views` int(11) NOT NULL,
  `edit_date` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `poll_views` (`poll_views`),
  KEY `get_current` (`is_current`),
  KEY `ps` (`submitter`),
  KEY `padd_time` (`add_time`),
  KEY `date_and_time` (`date_and_time`),
  KEY `ftjoin_pq` (`question`),
  KEY `ftjoin_po1` (`option1`),
  KEY `ftjoin_po2` (`option2`),
  KEY `ftjoin_po3` (`option3`),
  KEY `ftjoin_po4` (`option4`),
  KEY `ftjoin_po5` (`option5`)
) ENGINE=MyISAM AUTO_INCREMENT=201 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_poll_votes`;

CREATE TABLE `cms10_poll_votes` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `v_poll_id` int(11) NOT NULL,
  `v_voter_id` int(11) DEFAULT NULL,
  `v_voter_ip` varchar(40) NOT NULL,
  `v_vote_for` tinyint(4) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `v_voter_id` (`v_voter_id`),
  KEY `v_voter_ip` (`v_voter_ip`),
  KEY `v_vote_for` (`v_vote_for`)
) ENGINE=MyISAM AUTO_INCREMENT=201 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_post_tokens`;

CREATE TABLE `cms10_post_tokens` (
  `token` varchar(80) NOT NULL,
  `generation_time` int(10) unsigned NOT NULL,
  `member_id` int(11) NOT NULL,
  `session_id` varchar(80) NOT NULL,
  `ip_address` varchar(40) NOT NULL,
  `usage_tally` int(11) NOT NULL,
  PRIMARY KEY (`token`),
  KEY `generation_time` (`generation_time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_prices`;

CREATE TABLE `cms10_prices` (
  `name` varchar(80) NOT NULL,
  `price` int(11) NOT NULL,
  PRIMARY KEY (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_privilege_list`;

CREATE TABLE `cms10_privilege_list` (
  `p_section` varchar(80) NOT NULL,
  `the_name` varchar(80) NOT NULL,
  `the_default` tinyint(1) NOT NULL,
  PRIMARY KEY (`the_name`,`the_default`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_pstore_customs`;

CREATE TABLE `cms10_pstore_customs` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `c_title` int(10) unsigned NOT NULL,
  `c_description` int(11) NOT NULL,
  `c_mail_subject` int(10) unsigned NOT NULL,
  `c_mail_body` int(10) unsigned NOT NULL,
  `c_enabled` tinyint(1) NOT NULL,
  `c_cost` int(11) NOT NULL,
  `c_one_per_member` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_pstore_permissions`;

CREATE TABLE `cms10_pstore_permissions` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `p_title` int(10) unsigned NOT NULL,
  `p_description` int(11) NOT NULL,
  `p_mail_subject` int(10) unsigned NOT NULL,
  `p_mail_body` int(10) unsigned NOT NULL,
  `p_enabled` tinyint(1) NOT NULL,
  `p_cost` int(11) NOT NULL,
  `p_hours` int(11) DEFAULT NULL,
  `p_type` varchar(80) NOT NULL,
  `p_privilege` varchar(80) NOT NULL,
  `p_zone` varchar(80) NOT NULL,
  `p_page` varchar(80) NOT NULL,
  `p_module` varchar(80) NOT NULL,
  `p_category` varchar(80) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_quiz_entries`;

CREATE TABLE `cms10_quiz_entries` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `q_time` int(10) unsigned NOT NULL,
  `q_member` int(11) NOT NULL,
  `q_quiz` int(11) NOT NULL,
  `q_results` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_quiz_entry_answer`;

CREATE TABLE `cms10_quiz_entry_answer` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `q_entry` int(11) NOT NULL,
  `q_question` int(11) NOT NULL,
  `q_answer` longtext NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_quiz_member_last_visit`;

CREATE TABLE `cms10_quiz_member_last_visit` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `v_time` int(10) unsigned NOT NULL,
  `v_member_id` int(11) NOT NULL,
  `v_quiz_id` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_quiz_question_answers`;

CREATE TABLE `cms10_quiz_question_answers` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `q_question` int(11) NOT NULL,
  `q_answer_text` int(11) NOT NULL,
  `q_is_correct` tinyint(1) NOT NULL,
  `q_order` int(11) NOT NULL,
  `q_explanation` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_quiz_questions`;

CREATE TABLE `cms10_quiz_questions` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `q_type` varchar(80) NOT NULL,
  `q_quiz` int(11) NOT NULL,
  `q_question_text` int(11) NOT NULL,
  `q_question_extra_text` int(11) NOT NULL,
  `q_order` int(11) NOT NULL,
  `q_required` tinyint(1) NOT NULL,
  `q_marked` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=201 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_quiz_winner`;

CREATE TABLE `cms10_quiz_winner` (
  `q_quiz` int(11) NOT NULL,
  `q_entry` int(11) NOT NULL,
  `q_winner_level` int(11) NOT NULL,
  PRIMARY KEY (`q_quiz`,`q_entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_quizzes`;

CREATE TABLE `cms10_quizzes` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `q_timeout` int(11) DEFAULT NULL,
  `q_name` int(10) unsigned NOT NULL,
  `q_start_text` int(11) NOT NULL,
  `q_end_text` int(11) NOT NULL,
  `q_notes` longtext NOT NULL,
  `q_percentage` int(11) NOT NULL,
  `q_open_time` int(10) unsigned NOT NULL,
  `q_close_time` int(10) unsigned DEFAULT NULL,
  `q_num_winners` int(11) NOT NULL,
  `q_redo_time` int(11) DEFAULT NULL,
  `q_type` varchar(80) NOT NULL,
  `q_add_date` int(10) unsigned NOT NULL,
  `q_validated` tinyint(1) NOT NULL,
  `q_submitter` int(11) NOT NULL,
  `q_points_for_passing` int(11) NOT NULL,
  `q_tied_newsletter` int(11) DEFAULT NULL,
  `q_end_text_fail` int(11) NOT NULL,
  `q_reveal_answers` tinyint(1) NOT NULL,
  `q_shuffle_questions` tinyint(1) NOT NULL,
  `q_shuffle_answers` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `q_validated` (`q_validated`),
  KEY `ftjoin_qstarttext` (`q_start_text`)
) ENGINE=MyISAM AUTO_INCREMENT=201 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_rating`;

CREATE TABLE `cms10_rating` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `rating_for_type` varchar(80) NOT NULL,
  `rating_for_id` varchar(80) NOT NULL,
  `rating_member` int(11) NOT NULL,
  `rating_ip` varchar(40) NOT NULL,
  `rating_time` int(10) unsigned NOT NULL,
  `rating` tinyint(4) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `alt_key` (`rating_for_type`,`rating_for_id`),
  KEY `rating_for_id` (`rating_for_id`)
) ENGINE=MyISAM AUTO_INCREMENT=201 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_redirects`;

CREATE TABLE `cms10_redirects` (
  `r_from_page` varchar(80) NOT NULL,
  `r_from_zone` varchar(80) NOT NULL,
  `r_to_page` varchar(80) NOT NULL,
  `r_to_zone` varchar(80) NOT NULL,
  `r_is_transparent` tinyint(1) NOT NULL,
  PRIMARY KEY (`r_from_page`,`r_from_zone`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_referees_qualified_for`;

CREATE TABLE `cms10_referees_qualified_for` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `q_referee` int(11) NOT NULL,
  `q_referrer` int(11) NOT NULL,
  `q_scheme_name` varchar(80) NOT NULL,
  `q_email_address` varchar(255) NOT NULL,
  `q_time` int(10) unsigned NOT NULL,
  `q_action` varchar(80) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_referrer_override`;

CREATE TABLE `cms10_referrer_override` (
  `o_referrer` int(11) NOT NULL,
  `o_scheme_name` varchar(80) NOT NULL,
  `o_referrals_dif` int(11) NOT NULL,
  `o_is_qualified` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`o_referrer`,`o_scheme_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_reported_content`;

CREATE TABLE `cms10_reported_content` (
  `r_session_id` varchar(80) NOT NULL,
  `r_content_type` varchar(80) NOT NULL,
  `r_content_id` varchar(80) NOT NULL,
  `r_counts` tinyint(1) NOT NULL,
  PRIMARY KEY (`r_session_id`,`r_content_type`,`r_content_id`),
  KEY `reported_already` (`r_content_type`,`r_content_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_review_supplement`;

CREATE TABLE `cms10_review_supplement` (
  `r_post_id` int(11) NOT NULL,
  `r_rating_type` varchar(80) NOT NULL,
  `r_rating` tinyint(4) NOT NULL,
  `r_topic_id` int(11) NOT NULL,
  `r_rating_for_id` varchar(80) NOT NULL,
  `r_rating_for_type` varchar(80) NOT NULL,
  PRIMARY KEY (`r_post_id`,`r_rating_type`),
  KEY `rating_for_id` (`r_rating_for_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_revisions`;

CREATE TABLE `cms10_revisions` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `r_resource_type` varchar(80) NOT NULL,
  `r_resource_id` varchar(80) NOT NULL,
  `r_category_id` varchar(80) NOT NULL,
  `r_original_title` varchar(255) NOT NULL,
  `r_original_text` longtext NOT NULL,
  `r_original_content_owner` int(11) NOT NULL,
  `r_original_content_timestamp` int(10) unsigned NOT NULL,
  `r_original_resource_fs_path` longtext NOT NULL,
  `r_original_resource_fs_record` longtext NOT NULL,
  `r_actionlog_id` int(11) DEFAULT NULL,
  `r_moderatorlog_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `lookup_by_id` (`r_resource_type`,`r_resource_id`),
  KEY `lookup_by_cat` (`r_resource_type`,`r_category_id`),
  KEY `actionlog_link` (`r_actionlog_id`),
  KEY `moderatorlog_link` (`r_moderatorlog_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_sales`;

CREATE TABLE `cms10_sales` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `date_and_time` int(10) unsigned NOT NULL,
  `memberid` int(11) NOT NULL,
  `purchasetype` varchar(80) NOT NULL,
  `details` varchar(255) NOT NULL,
  `details2` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_searches_logged`;

CREATE TABLE `cms10_searches_logged` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `s_member_id` int(11) NOT NULL,
  `s_time` int(10) unsigned NOT NULL,
  `s_primary` varchar(255) NOT NULL,
  `s_auxillary` longtext NOT NULL,
  `s_num_results` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `past_search` (`s_primary`(250)),
  FULLTEXT KEY `past_search_ft` (`s_primary`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_searches_saved`;

CREATE TABLE `cms10_searches_saved` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `s_title` varchar(255) NOT NULL,
  `s_member_id` int(11) NOT NULL,
  `s_time` int(10) unsigned NOT NULL,
  `s_primary` varchar(255) NOT NULL,
  `s_auxillary` longtext NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_seo_meta`;

CREATE TABLE `cms10_seo_meta` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `meta_for_type` varchar(80) NOT NULL,
  `meta_for_id` varchar(80) NOT NULL,
  `meta_description` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `alt_key` (`meta_for_type`,`meta_for_id`),
  KEY `ftjoin_dmeta_description` (`meta_description`)
) ENGINE=MyISAM AUTO_INCREMENT=2411 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_seo_meta_keywords`;

CREATE TABLE `cms10_seo_meta_keywords` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `meta_for_type` varchar(80) NOT NULL,
  `meta_for_id` varchar(80) NOT NULL,
  `meta_keyword` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `keywords_alt_key` (`meta_for_type`,`meta_for_id`),
  KEY `ftjoin_dmeta_keywords` (`meta_keyword`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_sessions`;

CREATE TABLE `cms10_sessions` (
  `the_session` varchar(80) NOT NULL,
  `last_activity` int(10) unsigned NOT NULL,
  `member_id` int(11) NOT NULL,
  `ip` varchar(40) NOT NULL,
  `session_confirmed` tinyint(1) NOT NULL,
  `session_invisible` tinyint(1) NOT NULL,
  `cache_username` varchar(255) NOT NULL,
  `the_zone` varchar(80) NOT NULL,
  `the_page` varchar(80) NOT NULL,
  `the_type` varchar(80) NOT NULL,
  `the_id` varchar(80) NOT NULL,
  `the_title` varchar(255) NOT NULL,
  PRIMARY KEY (`the_session`),
  KEY `delete_old` (`last_activity`),
  KEY `member_id` (`member_id`),
  KEY `userat` (`the_zone`,`the_page`,`the_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_shopping_cart`;

CREATE TABLE `cms10_shopping_cart` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `session_id` varchar(80) NOT NULL,
  `ordered_by` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `product_name` varchar(255) NOT NULL,
  `product_code` varchar(255) NOT NULL,
  `quantity` int(11) NOT NULL,
  `price_pre_tax` double NOT NULL,
  `price` double NOT NULL,
  `product_description` longtext NOT NULL,
  `product_type` varchar(255) NOT NULL,
  `product_weight` double NOT NULL,
  `is_deleted` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `ordered_by` (`ordered_by`),
  KEY `session_id` (`session_id`),
  KEY `product_id` (`product_id`)
) ENGINE=MyISAM AUTO_INCREMENT=201 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_shopping_logging`;

CREATE TABLE `cms10_shopping_logging` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `e_member_id` int(11) NOT NULL,
  `session_id` varchar(80) NOT NULL,
  `ip` varchar(40) NOT NULL,
  `last_action` varchar(255) NOT NULL,
  `date_and_time` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`,`e_member_id`),
  KEY `calculate_bandwidth` (`date_and_time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_shopping_order`;

CREATE TABLE `cms10_shopping_order` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `c_member` int(11) NOT NULL,
  `session_id` varchar(80) NOT NULL,
  `add_date` int(10) unsigned NOT NULL,
  `tot_price` double NOT NULL,
  `order_status` varchar(80) NOT NULL,
  `notes` longtext NOT NULL,
  `transaction_id` varchar(255) NOT NULL,
  `purchase_through` varchar(255) NOT NULL,
  `tax_opted_out` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `finddispatchable` (`order_status`),
  KEY `soc_member` (`c_member`),
  KEY `sosession_id` (`session_id`),
  KEY `soadd_date` (`add_date`)
) ENGINE=MyISAM AUTO_INCREMENT=201 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_shopping_order_addresses`;

CREATE TABLE `cms10_shopping_order_addresses` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `order_id` int(11) DEFAULT NULL,
  `address_name` varchar(255) NOT NULL,
  `address_street` longtext NOT NULL,
  `address_city` varchar(255) NOT NULL,
  `address_state` varchar(255) NOT NULL,
  `address_zip` varchar(255) NOT NULL,
  `address_country` varchar(255) NOT NULL,
  `receiver_email` varchar(255) NOT NULL,
  `contact_phone` varchar(255) NOT NULL,
  `first_name` varchar(255) NOT NULL,
  `last_name` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `order_id` (`order_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_shopping_order_details`;

CREATE TABLE `cms10_shopping_order_details` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `order_id` int(11) DEFAULT NULL,
  `p_id` int(11) DEFAULT NULL,
  `p_name` varchar(255) NOT NULL,
  `p_code` varchar(255) NOT NULL,
  `p_type` varchar(255) NOT NULL,
  `p_quantity` int(11) NOT NULL,
  `p_price` double NOT NULL,
  `included_tax` double NOT NULL,
  `dispatch_status` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `p_id` (`p_id`),
  KEY `order_id` (`order_id`)
) ENGINE=MyISAM AUTO_INCREMENT=201 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_sitemap_cache`;

CREATE TABLE `cms10_sitemap_cache` (
  `page_link` varchar(255) NOT NULL,
  `set_number` int(11) NOT NULL,
  `add_date` int(10) unsigned DEFAULT NULL,
  `edit_date` int(10) unsigned DEFAULT NULL,
  `last_updated` int(10) unsigned NOT NULL,
  `is_deleted` tinyint(1) NOT NULL,
  `priority` double NOT NULL,
  `refreshfreq` varchar(80) NOT NULL,
  `guest_access` tinyint(1) NOT NULL,
  PRIMARY KEY (`page_link`),
  KEY `set_number` (`set_number`,`last_updated`),
  KEY `last_updated` (`last_updated`),
  KEY `is_deleted` (`is_deleted`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `cms10_sites`;

CREATE TABLE `cms10_sites` (
  `s_codename` varchar(80) NOT NULL,
  `s_name` varchar(255) NOT NULL,
  `s_description` longtext NOT NULL,
  `s_category` varchar(255) NOT NULL,
  `s_domain_name` varchar(255) NOT NULL,
  `s_server` varchar(80) NOT NULL,
  `s_member_id` int(11) NOT NULL,
  `s_add_time` int(10) unsigned NOT NULL,
  `s_last_backup_time` int(10) unsigned DEFAULT NULL,
  `s_subscribed` tinyint(1) NOT NULL,
  `s_sponsored_in_category` tinyint(1) NOT NULL,
  `s_show_in_directory` tinyint(1) NOT NULL,
  `s_sent_expire_message` tinyint(1) NOT NULL,
  PRIMARY KEY (`s_codename`),
  KEY `sponsored` (`s_sponsored_in_category`),
  KEY `timeorder` (`s_add_time`),
  FULLTEXT KEY `s_name` (`s_name`),
  FULLTEXT KEY `s_description` (`s_description`),
  FULLTEXT KEY `s_codename` (`s_codename`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_sites_advert_pings`;

CREATE TABLE `cms10_sites_advert_pings` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `s_codename` varchar(80) NOT NULL,
  `s_time` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_sites_deletion_codes`;

CREATE TABLE `cms10_sites_deletion_codes` (
  `s_codename` varchar(80) NOT NULL,
  `s_code` varchar(80) NOT NULL,
  `s_time` int(10) unsigned NOT NULL,
  PRIMARY KEY (`s_codename`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_sites_email`;

CREATE TABLE `cms10_sites_email` (
  `s_codename` varchar(80) NOT NULL,
  `s_email_from` varchar(80) NOT NULL,
  `s_email_to` varchar(255) NOT NULL,
  PRIMARY KEY (`s_codename`,`s_email_from`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_sms_log`;

CREATE TABLE `cms10_sms_log` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `s_member_id` int(11) NOT NULL,
  `s_time` int(10) unsigned NOT NULL,
  `s_trigger_ip` varchar(40) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `sms_log_for` (`s_member_id`,`s_time`),
  KEY `sms_trigger_ip` (`s_trigger_ip`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_staff_checklist_cus_tasks`;

CREATE TABLE `cms10_staff_checklist_cus_tasks` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `task_title` longtext NOT NULL,
  `add_date` int(10) unsigned NOT NULL,
  `recur_interval` int(11) NOT NULL,
  `recur_every` varchar(80) NOT NULL,
  `task_is_done` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_staff_links`;

CREATE TABLE `cms10_staff_links` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `link` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `link_title` varchar(255) NOT NULL,
  `link_desc` longtext NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=24 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_staff_tips_dismissed`;

CREATE TABLE `cms10_staff_tips_dismissed` (
  `t_member` int(11) NOT NULL,
  `t_tip` varchar(80) NOT NULL,
  PRIMARY KEY (`t_member`,`t_tip`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_staff_website_monitoring`;

CREATE TABLE `cms10_staff_website_monitoring` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `site_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `site_name` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_stats`;

CREATE TABLE `cms10_stats` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `the_page` varchar(255) NOT NULL,
  `ip` varchar(40) NOT NULL,
  `member_id` int(11) NOT NULL,
  `session_id` varchar(80) NOT NULL,
  `date_and_time` int(10) unsigned NOT NULL,
  `referer` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `s_get` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `post` longtext NOT NULL,
  `browser` varchar(255) NOT NULL,
  `milliseconds` int(11) NOT NULL,
  `operating_system` varchar(255) NOT NULL,
  `access_denied_counter` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `member_track_2` (`ip`),
  KEY `pages` (`the_page`(250)),
  KEY `date_and_time` (`date_and_time`),
  KEY `milliseconds` (`milliseconds`),
  KEY `referer` (`referer`(250)),
  KEY `browser` (`browser`(250)),
  KEY `operating_system` (`operating_system`(250)),
  KEY `member_track_4` (`session_id`),
  KEY `member_track_1` (`member_id`),
  KEY `member_track_3` (`member_id`,`date_and_time`)
) ENGINE=MyISAM AUTO_INCREMENT=418 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_subscriptions`;

CREATE TABLE `cms10_subscriptions` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `s_type_code` varchar(80) NOT NULL,
  `s_member_id` int(11) NOT NULL,
  `s_state` varchar(80) NOT NULL,
  `s_amount` varchar(255) NOT NULL,
  `s_purchase_id` varchar(80) NOT NULL,
  `s_time` int(10) unsigned NOT NULL,
  `s_auto_fund_source` varchar(80) NOT NULL,
  `s_auto_fund_key` varchar(255) NOT NULL,
  `s_via` varchar(80) NOT NULL,
  `s_length` int(11) NOT NULL,
  `s_length_units` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_task_queue`;

CREATE TABLE `cms10_task_queue` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `t_title` varchar(255) NOT NULL,
  `t_hook` varchar(80) NOT NULL,
  `t_args` longtext NOT NULL,
  `t_member_id` int(11) NOT NULL,
  `t_secure_ref` varchar(80) NOT NULL,
  `t_send_notification` tinyint(1) NOT NULL,
  `t_locked` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_temp_block_permissions`;

CREATE TABLE `cms10_temp_block_permissions` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `p_session_id` varchar(80) NOT NULL,
  `p_block_constraints` longtext NOT NULL,
  `p_time` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_test_sections`;

CREATE TABLE `cms10_test_sections` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `s_section` varchar(255) NOT NULL,
  `s_notes` longtext NOT NULL,
  `s_inheritable` tinyint(1) NOT NULL,
  `s_assigned_to` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_tests`;

CREATE TABLE `cms10_tests` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `t_section` int(11) NOT NULL,
  `t_test` longtext NOT NULL,
  `t_assigned_to` int(11) DEFAULT NULL,
  `t_enabled` tinyint(1) NOT NULL,
  `t_status` int(11) NOT NULL,
  `t_inherit_section` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_theme_images`;

CREATE TABLE `cms10_theme_images` (
  `id` varchar(255) NOT NULL,
  `theme` varchar(40) NOT NULL,
  `path` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `lang` varchar(5) NOT NULL,
  PRIMARY KEY (`id`,`theme`,`lang`),
  KEY `theme` (`theme`,`lang`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `cms10_ticket_extra_access`;

CREATE TABLE `cms10_ticket_extra_access` (
  `ticket_id` varchar(255) NOT NULL,
  `member_id` int(11) NOT NULL,
  PRIMARY KEY (`ticket_id`,`member_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `cms10_ticket_known_emailers`;

CREATE TABLE `cms10_ticket_known_emailers` (
  `email_address` varchar(255) NOT NULL,
  `member_id` int(11) NOT NULL,
  PRIMARY KEY (`email_address`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `cms10_ticket_types`;

CREATE TABLE `cms10_ticket_types` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `ticket_type_name` int(10) unsigned NOT NULL,
  `guest_emails_mandatory` tinyint(1) NOT NULL,
  `search_faq` tinyint(1) NOT NULL,
  `cache_lead_time` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_tickets`;

CREATE TABLE `cms10_tickets` (
  `ticket_id` varchar(255) NOT NULL,
  `topic_id` int(11) NOT NULL,
  `forum_id` int(11) NOT NULL,
  `ticket_type` int(11) NOT NULL,
  PRIMARY KEY (`ticket_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `cms10_trackbacks`;

CREATE TABLE `cms10_trackbacks` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `trackback_for_type` varchar(80) NOT NULL,
  `trackback_for_id` varchar(80) NOT NULL,
  `trackback_ip` varchar(40) NOT NULL,
  `trackback_time` int(10) unsigned NOT NULL,
  `trackback_url` varchar(255) NOT NULL,
  `trackback_title` varchar(255) NOT NULL,
  `trackback_excerpt` longtext NOT NULL,
  `trackback_name` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `trackback_for_type` (`trackback_for_type`),
  KEY `trackback_for_id` (`trackback_for_id`),
  KEY `trackback_time` (`trackback_time`)
) ENGINE=MyISAM AUTO_INCREMENT=201 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_trans_expecting`;

CREATE TABLE `cms10_trans_expecting` (
  `id` varchar(80) NOT NULL,
  `e_purchase_id` varchar(80) NOT NULL,
  `e_item_name` varchar(255) NOT NULL,
  `e_member_id` int(11) NOT NULL,
  `e_amount` varchar(255) NOT NULL,
  `e_currency` varchar(80) NOT NULL,
  `e_ip_address` varchar(40) NOT NULL,
  `e_session_id` varchar(80) NOT NULL,
  `e_time` int(10) unsigned NOT NULL,
  `e_length` int(11) DEFAULT NULL,
  `e_length_units` varchar(80) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_transactions`;

CREATE TABLE `cms10_transactions` (
  `id` varchar(80) NOT NULL,
  `t_type_code` varchar(80) NOT NULL,
  `t_purchase_id` varchar(80) NOT NULL,
  `t_status` varchar(255) NOT NULL,
  `t_reason` varchar(255) NOT NULL,
  `t_amount` varchar(255) NOT NULL,
  `t_currency` varchar(80) NOT NULL,
  `t_parent_txn_id` varchar(80) NOT NULL,
  `t_time` int(10) unsigned NOT NULL,
  `t_pending_reason` varchar(255) NOT NULL,
  `t_memo` longtext NOT NULL,
  `t_via` varchar(80) NOT NULL,
  PRIMARY KEY (`id`,`t_time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_translate`;

CREATE TABLE `cms10_translate` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `language` varchar(5) NOT NULL,
  `importance_level` tinyint(4) NOT NULL,
  `text_original` longtext NOT NULL,
  `text_parsed` longtext NOT NULL,
  `broken` tinyint(1) NOT NULL,
  `source_user` int(11) NOT NULL,
  PRIMARY KEY (`id`,`language`),
  KEY `importance_level` (`importance_level`),
  KEY `equiv_lang` (`text_original`(4)),
  KEY `decache` (`text_parsed`(2)),
  FULLTEXT KEY `tsearch` (`text_original`)
) ENGINE=MyISAM AUTO_INCREMENT=15064 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_tutorial_links`;

CREATE TABLE `cms10_tutorial_links` (
  `the_name` varchar(80) NOT NULL,
  `the_value` longtext NOT NULL,
  PRIMARY KEY (`the_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_tutorials_external`;

CREATE TABLE `cms10_tutorials_external` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `t_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `t_title` varchar(255) NOT NULL,
  `t_summary` longtext NOT NULL,
  `t_icon` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `t_media_type` varchar(80) NOT NULL,
  `t_difficulty_level` varchar(80) NOT NULL,
  `t_pinned` tinyint(1) NOT NULL,
  `t_author` varchar(80) NOT NULL,
  `t_submitter` int(11) NOT NULL,
  `t_views` int(11) NOT NULL,
  `t_add_date` int(10) unsigned NOT NULL,
  `t_edit_date` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=46 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_tutorials_external_tags`;

CREATE TABLE `cms10_tutorials_external_tags` (
  `t_id` int(11) NOT NULL,
  `t_tag` varchar(80) NOT NULL,
  PRIMARY KEY (`t_id`,`t_tag`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_tutorials_internal`;

CREATE TABLE `cms10_tutorials_internal` (
  `t_page_name` varchar(80) NOT NULL,
  `t_views` int(11) NOT NULL,
  PRIMARY KEY (`t_page_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_unbannable_ip`;

CREATE TABLE `cms10_unbannable_ip` (
  `ip` varchar(40) NOT NULL,
  `note` varchar(255) NOT NULL,
  PRIMARY KEY (`ip`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_url_id_monikers`;

CREATE TABLE `cms10_url_id_monikers` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `m_resource_page` varchar(80) NOT NULL,
  `m_resource_type` varchar(80) NOT NULL,
  `m_resource_id` varchar(80) NOT NULL,
  `m_moniker` varchar(255) NOT NULL,
  `m_moniker_reversed` varchar(255) NOT NULL,
  `m_deprecated` tinyint(1) NOT NULL,
  `m_manually_chosen` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `uim_moniker` (`m_moniker`(250)),
  KEY `uim_monrev` (`m_moniker_reversed`(250)),
  KEY `uim_page_link` (`m_resource_page`,`m_resource_type`,`m_resource_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1438 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_url_title_cache`;

CREATE TABLE `cms10_url_title_cache` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `t_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `t_title` varchar(255) NOT NULL,
  `t_meta_title` longtext NOT NULL,
  `t_keywords` longtext NOT NULL,
  `t_description` longtext NOT NULL,
  `t_image_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `t_mime_type` varchar(80) NOT NULL,
  `t_json_discovery` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `t_xml_discovery` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  PRIMARY KEY (`id`),
  KEY `t_url` (`t_url`(250))
) ENGINE=MyISAM AUTO_INCREMENT=109 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_urls_checked`;

CREATE TABLE `cms10_urls_checked` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `url` longtext NOT NULL,
  `url_exists` tinyint(1) NOT NULL,
  `url_check_time` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `url` (`url`(200))
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_usersonline_track`;

CREATE TABLE `cms10_usersonline_track` (
  `date_and_time` int(10) unsigned NOT NULL,
  `peak` int(11) NOT NULL,
  PRIMARY KEY (`date_and_time`),
  KEY `peak_track` (`peak`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_usersubmitban_member`;

CREATE TABLE `cms10_usersubmitban_member` (
  `the_member` int(11) NOT NULL,
  PRIMARY KEY (`the_member`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_values`;

CREATE TABLE `cms10_values` (
  `the_name` varchar(80) NOT NULL,
  `the_value` varchar(255) NOT NULL,
  `date_and_time` int(10) unsigned NOT NULL,
  PRIMARY KEY (`the_name`),
  KEY `date_and_time` (`date_and_time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_values_elective`;

CREATE TABLE `cms10_values_elective` (
  `the_name` varchar(80) NOT NULL,
  `the_value` longtext NOT NULL,
  `date_and_time` int(10) unsigned NOT NULL,
  PRIMARY KEY (`the_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_video_transcoding`;

CREATE TABLE `cms10_video_transcoding` (
  `t_id` varchar(80) NOT NULL,
  `t_local_id` int(11) DEFAULT NULL,
  `t_local_id_field` varchar(80) NOT NULL,
  `t_error` longtext NOT NULL,
  `t_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `t_table` varchar(80) NOT NULL,
  `t_url_field` varchar(80) NOT NULL,
  `t_orig_filename_field` varchar(80) NOT NULL,
  `t_width_field` varchar(80) NOT NULL,
  `t_height_field` varchar(80) NOT NULL,
  `t_output_filename` varchar(80) NOT NULL,
  PRIMARY KEY (`t_id`),
  KEY `t_local_id` (`t_local_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_videos`;

CREATE TABLE `cms10_videos` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cat` varchar(80) NOT NULL,
  `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `thumb_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `description` int(11) NOT NULL,
  `allow_rating` tinyint(1) NOT NULL,
  `allow_comments` tinyint(4) NOT NULL,
  `allow_trackbacks` tinyint(1) NOT NULL,
  `notes` longtext NOT NULL,
  `submitter` int(11) NOT NULL,
  `validated` tinyint(1) NOT NULL,
  `add_date` int(10) unsigned NOT NULL,
  `edit_date` int(10) unsigned DEFAULT NULL,
  `video_views` int(11) NOT NULL,
  `video_width` int(11) NOT NULL,
  `video_height` int(11) NOT NULL,
  `video_length` int(11) NOT NULL,
  `title` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `video_views` (`video_views`),
  KEY `vs` (`submitter`),
  KEY `v_validated` (`validated`),
  KEY `category_list` (`cat`),
  KEY `vadd_date` (`add_date`),
  KEY `ftjoin_dtitle` (`title`),
  KEY `ftjoin_vdescription` (`description`)
) ENGINE=MyISAM AUTO_INCREMENT=201 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_webstandards_checked_once`;

CREATE TABLE `cms10_webstandards_checked_once` (
  `hash` varchar(255) NOT NULL,
  PRIMARY KEY (`hash`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `cms10_wiki_children`;

CREATE TABLE `cms10_wiki_children` (
  `parent_id` int(11) NOT NULL,
  `child_id` int(11) NOT NULL,
  `the_order` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  PRIMARY KEY (`parent_id`,`child_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_wiki_pages`;

CREATE TABLE `cms10_wiki_pages` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `title` int(10) unsigned NOT NULL,
  `notes` longtext NOT NULL,
  `description` int(11) NOT NULL,
  `add_date` int(10) unsigned NOT NULL,
  `edit_date` int(10) unsigned DEFAULT NULL,
  `wiki_views` int(11) NOT NULL,
  `hide_posts` tinyint(1) NOT NULL,
  `submitter` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `sps` (`submitter`),
  KEY `sadd_date` (`add_date`),
  KEY `ftjoin_spt` (`title`),
  KEY `ftjoin_spd` (`description`),
  KEY `wiki_views` (`wiki_views`)
) ENGINE=MyISAM AUTO_INCREMENT=201 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_wiki_posts`;

CREATE TABLE `cms10_wiki_posts` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `page_id` int(11) NOT NULL,
  `the_message` int(11) NOT NULL,
  `date_and_time` int(10) unsigned NOT NULL,
  `validated` tinyint(1) NOT NULL,
  `wiki_views` int(11) NOT NULL,
  `member_id` int(11) NOT NULL,
  `edit_date` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `posts_on_page` (`page_id`),
  KEY `cdate_and_time` (`date_and_time`),
  KEY `svalidated` (`validated`),
  KEY `ftjoin_spm` (`the_message`),
  KEY `wiki_views` (`wiki_views`),
  KEY `spos` (`member_id`)
) ENGINE=MyISAM AUTO_INCREMENT=200 DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_wordfilter`;

CREATE TABLE `cms10_wordfilter` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `word` varchar(255) NOT NULL,
  `w_replacement` varchar(255) NOT NULL,
  `w_substr` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=43 DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `cms10_workflow_approval_points`;

CREATE TABLE `cms10_workflow_approval_points` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `workflow_id` int(11) NOT NULL,
  `workflow_approval_name` int(10) unsigned NOT NULL,
  `the_position` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_workflow_content`;

CREATE TABLE `cms10_workflow_content` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `content_type` varchar(80) NOT NULL,
  `content_id` varchar(80) NOT NULL,
  `workflow_id` int(11) NOT NULL,
  `notes` longtext NOT NULL,
  `original_submitter` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_workflow_content_status`;

CREATE TABLE `cms10_workflow_content_status` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `workflow_content_id` int(11) NOT NULL,
  `workflow_approval_point_id` int(11) NOT NULL,
  `status_code` tinyint(4) NOT NULL,
  `approved_by` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_workflow_permissions`;

CREATE TABLE `cms10_workflow_permissions` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `workflow_approval_point_id` int(11) NOT NULL,
  `usergroup` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_workflows`;

CREATE TABLE `cms10_workflows` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `workflow_name` int(10) unsigned NOT NULL,
  `is_default` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `cms10_zones`;

CREATE TABLE `cms10_zones` (
  `zone_name` varchar(80) NOT NULL,
  `zone_title` int(10) unsigned NOT NULL,
  `zone_default_page` varchar(80) NOT NULL,
  `zone_header_text` int(10) unsigned NOT NULL,
  `zone_theme` varchar(80) NOT NULL,
  `zone_require_session` tinyint(1) NOT NULL,
  PRIMARY KEY (`zone_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;


DROP TABLE IF EXISTS `mantis_bug_file_table`;

CREATE TABLE `mantis_bug_file_table` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `bug_id` int(10) unsigned NOT NULL DEFAULT '0',
  `title` varchar(250) NOT NULL DEFAULT '',
  `description` varchar(250) NOT NULL DEFAULT '',
  `diskfile` varchar(250) NOT NULL DEFAULT '',
  `filename` varchar(250) NOT NULL DEFAULT '',
  `folder` varchar(250) NOT NULL DEFAULT '',
  `filesize` int(11) NOT NULL DEFAULT '0',
  `file_type` varchar(250) NOT NULL DEFAULT '',
  `content` longblob NOT NULL,
  `date_added` int(10) unsigned NOT NULL DEFAULT '1',
  `user_id` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `idx_bug_file_bug_id` (`bug_id`),
  KEY `idx_diskfile` (`diskfile`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `mantis_bug_history_table`;

CREATE TABLE `mantis_bug_history_table` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned NOT NULL DEFAULT '0',
  `bug_id` int(10) unsigned NOT NULL DEFAULT '0',
  `field_name` varchar(64) NOT NULL,
  `old_value` varchar(255) NOT NULL,
  `new_value` varchar(255) NOT NULL,
  `type` smallint(6) NOT NULL DEFAULT '0',
  `date_modified` int(10) unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `idx_bug_history_bug_id` (`bug_id`),
  KEY `idx_history_user_id` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `mantis_bug_monitor_table`;

CREATE TABLE `mantis_bug_monitor_table` (
  `user_id` int(10) unsigned NOT NULL DEFAULT '0',
  `bug_id` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`user_id`,`bug_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `mantis_bug_relationship_table`;

CREATE TABLE `mantis_bug_relationship_table` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `source_bug_id` int(10) unsigned NOT NULL DEFAULT '0',
  `destination_bug_id` int(10) unsigned NOT NULL DEFAULT '0',
  `relationship_type` smallint(6) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `idx_relationship_source` (`source_bug_id`),
  KEY `idx_relationship_destination` (`destination_bug_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `mantis_bug_revision_table`;

CREATE TABLE `mantis_bug_revision_table` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `bug_id` int(10) unsigned NOT NULL,
  `bugnote_id` int(10) unsigned NOT NULL DEFAULT '0',
  `user_id` int(10) unsigned NOT NULL,
  `type` int(10) unsigned NOT NULL,
  `value` longtext NOT NULL,
  `timestamp` int(10) unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `idx_bug_rev_type` (`type`),
  KEY `idx_bug_rev_id_time` (`bug_id`,`timestamp`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `mantis_bug_table`;

CREATE TABLE `mantis_bug_table` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `project_id` int(10) unsigned NOT NULL DEFAULT '0',
  `reporter_id` int(10) unsigned NOT NULL DEFAULT '0',
  `handler_id` int(10) unsigned NOT NULL DEFAULT '0',
  `duplicate_id` int(10) unsigned NOT NULL DEFAULT '0',
  `priority` smallint(6) NOT NULL DEFAULT '30',
  `severity` smallint(6) NOT NULL DEFAULT '50',
  `reproducibility` smallint(6) NOT NULL DEFAULT '10',
  `status` smallint(6) NOT NULL DEFAULT '10',
  `resolution` smallint(6) NOT NULL DEFAULT '10',
  `projection` smallint(6) NOT NULL DEFAULT '10',
  `eta` smallint(6) NOT NULL DEFAULT '10',
  `bug_text_id` int(10) unsigned NOT NULL DEFAULT '0',
  `os` varchar(32) NOT NULL DEFAULT '',
  `os_build` varchar(32) NOT NULL DEFAULT '',
  `platform` varchar(32) NOT NULL DEFAULT '',
  `version` varchar(64) NOT NULL DEFAULT '',
  `fixed_in_version` varchar(64) NOT NULL DEFAULT '',
  `build` varchar(32) NOT NULL DEFAULT '',
  `profile_id` int(10) unsigned NOT NULL DEFAULT '0',
  `view_state` smallint(6) NOT NULL DEFAULT '10',
  `summary` varchar(128) NOT NULL DEFAULT '',
  `sponsorship_total` int(11) NOT NULL DEFAULT '0',
  `sticky` tinyint(4) NOT NULL DEFAULT '0',
  `target_version` varchar(64) NOT NULL DEFAULT '',
  `category_id` int(10) unsigned NOT NULL DEFAULT '1',
  `date_submitted` int(10) unsigned NOT NULL DEFAULT '1',
  `due_date` int(10) unsigned NOT NULL DEFAULT '1',
  `last_updated` int(10) unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `idx_bug_sponsorship_total` (`sponsorship_total`),
  KEY `idx_bug_fixed_in_version` (`fixed_in_version`),
  KEY `idx_bug_status` (`status`),
  KEY `idx_project` (`project_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `mantis_bug_tag_table`;

CREATE TABLE `mantis_bug_tag_table` (
  `bug_id` int(10) unsigned NOT NULL DEFAULT '0',
  `tag_id` int(10) unsigned NOT NULL DEFAULT '0',
  `user_id` int(10) unsigned NOT NULL DEFAULT '0',
  `date_attached` int(10) unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`bug_id`,`tag_id`),
  KEY `idx_bug_tag_tag_id` (`tag_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `mantis_bug_text_table`;

CREATE TABLE `mantis_bug_text_table` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `description` longtext NOT NULL,
  `steps_to_reproduce` longtext NOT NULL,
  `additional_information` longtext NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `mantis_bugnote_table`;

CREATE TABLE `mantis_bugnote_table` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `bug_id` int(10) unsigned NOT NULL DEFAULT '0',
  `reporter_id` int(10) unsigned NOT NULL DEFAULT '0',
  `bugnote_text_id` int(10) unsigned NOT NULL DEFAULT '0',
  `view_state` smallint(6) NOT NULL DEFAULT '10',
  `note_type` int(11) DEFAULT '0',
  `note_attr` varchar(250) DEFAULT '',
  `time_tracking` int(10) unsigned NOT NULL DEFAULT '0',
  `last_modified` int(10) unsigned NOT NULL DEFAULT '1',
  `date_submitted` int(10) unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `idx_bug` (`bug_id`),
  KEY `idx_last_mod` (`last_modified`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `mantis_bugnote_text_table`;

CREATE TABLE `mantis_bugnote_text_table` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `note` longtext NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `mantis_category_table`;

CREATE TABLE `mantis_category_table` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `project_id` int(10) unsigned NOT NULL DEFAULT '0',
  `user_id` int(10) unsigned NOT NULL DEFAULT '0',
  `name` varchar(128) NOT NULL DEFAULT '',
  `status` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `idx_category_project_name` (`project_id`,`name`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `mantis_config_table`;

CREATE TABLE `mantis_config_table` (
  `config_id` varchar(64) NOT NULL,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `user_id` int(11) NOT NULL DEFAULT '0',
  `access_reqd` int(11) DEFAULT '0',
  `type` int(11) DEFAULT '90',
  `value` longtext NOT NULL,
  PRIMARY KEY (`config_id`,`project_id`,`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `mantis_custom_field_project_table`;

CREATE TABLE `mantis_custom_field_project_table` (
  `field_id` int(11) NOT NULL DEFAULT '0',
  `project_id` int(10) unsigned NOT NULL DEFAULT '0',
  `sequence` smallint(6) NOT NULL DEFAULT '0',
  PRIMARY KEY (`field_id`,`project_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `mantis_custom_field_string_table`;

CREATE TABLE `mantis_custom_field_string_table` (
  `field_id` int(11) NOT NULL DEFAULT '0',
  `bug_id` int(11) NOT NULL DEFAULT '0',
  `value` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`field_id`,`bug_id`),
  KEY `idx_custom_field_bug` (`bug_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `mantis_custom_field_table`;

CREATE TABLE `mantis_custom_field_table` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(64) NOT NULL DEFAULT '',
  `type` smallint(6) NOT NULL DEFAULT '0',
  `possible_values` text NOT NULL,
  `default_value` varchar(255) NOT NULL DEFAULT '',
  `valid_regexp` varchar(255) NOT NULL DEFAULT '',
  `access_level_r` smallint(6) NOT NULL DEFAULT '0',
  `access_level_rw` smallint(6) NOT NULL DEFAULT '0',
  `length_min` int(11) NOT NULL DEFAULT '0',
  `length_max` int(11) NOT NULL DEFAULT '0',
  `require_report` tinyint(4) NOT NULL DEFAULT '0',
  `require_update` tinyint(4) NOT NULL DEFAULT '0',
  `display_report` tinyint(4) NOT NULL DEFAULT '0',
  `display_update` tinyint(4) NOT NULL DEFAULT '1',
  `require_resolved` tinyint(4) NOT NULL DEFAULT '0',
  `display_resolved` tinyint(4) NOT NULL DEFAULT '0',
  `display_closed` tinyint(4) NOT NULL DEFAULT '0',
  `require_closed` tinyint(4) NOT NULL DEFAULT '0',
  `filter_by` tinyint(4) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `idx_custom_field_name` (`name`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `mantis_email_table`;

CREATE TABLE `mantis_email_table` (
  `email_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `email` varchar(64) NOT NULL DEFAULT '',
  `subject` varchar(250) NOT NULL DEFAULT '',
  `metadata` longtext NOT NULL,
  `body` longtext NOT NULL,
  `submitted` int(10) unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`email_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `mantis_filters_table`;

CREATE TABLE `mantis_filters_table` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL DEFAULT '0',
  `project_id` int(11) NOT NULL DEFAULT '0',
  `is_public` tinyint(4) DEFAULT NULL,
  `name` varchar(64) NOT NULL DEFAULT '',
  `filter_string` longtext NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `mantis_news_table`;

CREATE TABLE `mantis_news_table` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `project_id` int(10) unsigned NOT NULL DEFAULT '0',
  `poster_id` int(10) unsigned NOT NULL DEFAULT '0',
  `view_state` smallint(6) NOT NULL DEFAULT '10',
  `announcement` tinyint(4) NOT NULL DEFAULT '0',
  `headline` varchar(64) NOT NULL DEFAULT '',
  `body` longtext NOT NULL,
  `last_modified` int(10) unsigned NOT NULL DEFAULT '1',
  `date_posted` int(10) unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `mantis_plugin_table`;

CREATE TABLE `mantis_plugin_table` (
  `basename` varchar(40) NOT NULL,
  `enabled` tinyint(4) NOT NULL DEFAULT '0',
  `protected` tinyint(4) NOT NULL DEFAULT '0',
  `priority` int(10) unsigned NOT NULL DEFAULT '3',
  PRIMARY KEY (`basename`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `mantis_project_file_table`;

CREATE TABLE `mantis_project_file_table` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `project_id` int(10) unsigned NOT NULL DEFAULT '0',
  `title` varchar(250) NOT NULL DEFAULT '',
  `description` varchar(250) NOT NULL DEFAULT '',
  `diskfile` varchar(250) NOT NULL DEFAULT '',
  `filename` varchar(250) NOT NULL DEFAULT '',
  `folder` varchar(250) NOT NULL DEFAULT '',
  `filesize` int(11) NOT NULL DEFAULT '0',
  `file_type` varchar(250) NOT NULL DEFAULT '',
  `content` longblob NOT NULL,
  `date_added` int(10) unsigned NOT NULL DEFAULT '1',
  `user_id` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `mantis_project_hierarchy_table`;

CREATE TABLE `mantis_project_hierarchy_table` (
  `child_id` int(10) unsigned NOT NULL,
  `parent_id` int(10) unsigned NOT NULL,
  `inherit_parent` int(10) unsigned NOT NULL DEFAULT '0',
  KEY `idx_project_hierarchy_child_id` (`child_id`),
  KEY `idx_project_hierarchy_parent_id` (`parent_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `mantis_project_table`;

CREATE TABLE `mantis_project_table` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(128) NOT NULL DEFAULT '',
  `status` smallint(6) NOT NULL DEFAULT '10',
  `enabled` tinyint(4) NOT NULL DEFAULT '1',
  `view_state` smallint(6) NOT NULL DEFAULT '10',
  `access_min` smallint(6) NOT NULL DEFAULT '10',
  `file_path` varchar(250) NOT NULL DEFAULT '',
  `description` longtext NOT NULL,
  `category_id` int(10) unsigned NOT NULL DEFAULT '1',
  `inherit_global` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `idx_project_name` (`name`),
  KEY `idx_project_view` (`view_state`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `mantis_project_user_list_table`;

CREATE TABLE `mantis_project_user_list_table` (
  `project_id` int(10) unsigned NOT NULL DEFAULT '0',
  `user_id` int(10) unsigned NOT NULL DEFAULT '0',
  `access_level` smallint(6) NOT NULL DEFAULT '10',
  PRIMARY KEY (`project_id`,`user_id`),
  KEY `idx_project_user` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `mantis_project_version_table`;

CREATE TABLE `mantis_project_version_table` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `project_id` int(10) unsigned NOT NULL DEFAULT '0',
  `version` varchar(64) NOT NULL DEFAULT '',
  `description` longtext NOT NULL,
  `released` tinyint(4) NOT NULL DEFAULT '1',
  `obsolete` tinyint(4) NOT NULL DEFAULT '0',
  `date_order` int(10) unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  UNIQUE KEY `idx_project_version` (`project_id`,`version`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `mantis_sponsorship_table`;

CREATE TABLE `mantis_sponsorship_table` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `bug_id` int(11) NOT NULL DEFAULT '0',
  `user_id` int(11) NOT NULL DEFAULT '0',
  `amount` int(11) NOT NULL DEFAULT '0',
  `logo` varchar(128) NOT NULL DEFAULT '',
  `url` varchar(128) NOT NULL DEFAULT '',
  `paid` tinyint(4) NOT NULL DEFAULT '0',
  `date_submitted` int(10) unsigned NOT NULL DEFAULT '1',
  `last_updated` int(10) unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `idx_sponsorship_bug_id` (`bug_id`),
  KEY `idx_sponsorship_user_id` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `mantis_tag_table`;

CREATE TABLE `mantis_tag_table` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned NOT NULL DEFAULT '0',
  `name` varchar(100) NOT NULL DEFAULT '',
  `description` longtext NOT NULL,
  `date_created` int(10) unsigned NOT NULL DEFAULT '1',
  `date_updated` int(10) unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`,`name`),
  KEY `idx_tag_name` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `mantis_tokens_table`;

CREATE TABLE `mantis_tokens_table` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `owner` int(11) NOT NULL,
  `type` int(11) NOT NULL,
  `value` longtext NOT NULL,
  `timestamp` int(10) unsigned NOT NULL DEFAULT '1',
  `expiry` int(10) unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `idx_typeowner` (`type`,`owner`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `mantis_user_pref_table`;

CREATE TABLE `mantis_user_pref_table` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned NOT NULL DEFAULT '0',
  `project_id` int(10) unsigned NOT NULL DEFAULT '0',
  `default_profile` int(10) unsigned NOT NULL DEFAULT '0',
  `default_project` int(10) unsigned NOT NULL DEFAULT '0',
  `refresh_delay` int(11) NOT NULL DEFAULT '0',
  `redirect_delay` int(11) NOT NULL DEFAULT '0',
  `bugnote_order` varchar(4) NOT NULL DEFAULT 'ASC',
  `email_on_new` tinyint(4) NOT NULL DEFAULT '0',
  `email_on_assigned` tinyint(4) NOT NULL DEFAULT '0',
  `email_on_feedback` tinyint(4) NOT NULL DEFAULT '0',
  `email_on_resolved` tinyint(4) NOT NULL DEFAULT '0',
  `email_on_closed` tinyint(4) NOT NULL DEFAULT '0',
  `email_on_reopened` tinyint(4) NOT NULL DEFAULT '0',
  `email_on_bugnote` tinyint(4) NOT NULL DEFAULT '0',
  `email_on_status` tinyint(4) NOT NULL DEFAULT '0',
  `email_on_priority` tinyint(4) NOT NULL DEFAULT '0',
  `email_on_priority_min_severity` smallint(6) NOT NULL DEFAULT '10',
  `email_on_status_min_severity` smallint(6) NOT NULL DEFAULT '10',
  `email_on_bugnote_min_severity` smallint(6) NOT NULL DEFAULT '10',
  `email_on_reopened_min_severity` smallint(6) NOT NULL DEFAULT '10',
  `email_on_closed_min_severity` smallint(6) NOT NULL DEFAULT '10',
  `email_on_resolved_min_severity` smallint(6) NOT NULL DEFAULT '10',
  `email_on_feedback_min_severity` smallint(6) NOT NULL DEFAULT '10',
  `email_on_assigned_min_severity` smallint(6) NOT NULL DEFAULT '10',
  `email_on_new_min_severity` smallint(6) NOT NULL DEFAULT '10',
  `email_bugnote_limit` smallint(6) NOT NULL DEFAULT '0',
  `language` varchar(32) NOT NULL DEFAULT 'english',
  `timezone` varchar(32) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `mantis_user_print_pref_table`;

CREATE TABLE `mantis_user_print_pref_table` (
  `user_id` int(10) unsigned NOT NULL DEFAULT '0',
  `print_pref` varchar(64) NOT NULL,
  PRIMARY KEY (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `mantis_user_profile_table`;

CREATE TABLE `mantis_user_profile_table` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned NOT NULL DEFAULT '0',
  `platform` varchar(32) NOT NULL DEFAULT '',
  `os` varchar(32) NOT NULL DEFAULT '',
  `os_build` varchar(32) NOT NULL DEFAULT '',
  `description` longtext NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `mantis_user_table`;

CREATE TABLE `mantis_user_table` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(32) NOT NULL DEFAULT '',
  `realname` varchar(64) NOT NULL DEFAULT '',
  `email` varchar(64) NOT NULL DEFAULT '',
  `password` varchar(32) NOT NULL DEFAULT '',
  `enabled` tinyint(4) NOT NULL DEFAULT '1',
  `protected` tinyint(4) NOT NULL DEFAULT '0',
  `access_level` smallint(6) NOT NULL DEFAULT '10',
  `login_count` int(11) NOT NULL DEFAULT '0',
  `lost_password_request_count` smallint(6) NOT NULL DEFAULT '0',
  `failed_login_count` smallint(6) NOT NULL DEFAULT '0',
  `cookie_string` varchar(64) NOT NULL DEFAULT '',
  `last_visit` int(10) unsigned NOT NULL DEFAULT '1',
  `date_created` int(10) unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  UNIQUE KEY `idx_user_cookie_string` (`cookie_string`),
  UNIQUE KEY `idx_user_username` (`username`),
  KEY `idx_enable` (`enabled`),
  KEY `idx_access` (`access_level`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


SET FOREIGN_KEY_CHECKS = 1;
