DROP TABLE IF EXISTS cms_db_meta;

CREATE TABLE cms_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)
) CHARACTER SET=utf8mb4 engine=MyISAM;

ALTER TABLE cms_db_meta ADD INDEX findtransfields (m_type);

INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('translate', 'id', '*AUTO'),
('translate', 'language', '*LANGUAGE_NAME'),
('translate', 'importance_level', 'SHORT_INTEGER'),
('translate', 'text_original', 'LONG_TEXT'),
('translate', 'text_parsed', 'LONG_TEXT'),
('translate', 'broken', 'BINARY'),
('translate', 'source_user', 'MEMBER'),
('values', 'the_name', '*ID_TEXT'),
('values', 'the_value', 'SHORT_TEXT'),
('values', 'date_and_time', 'TIME'),
('config', 'c_name', '*ID_TEXT'),
('config', 'c_set', 'BINARY'),
('config', 'c_value', 'LONG_TEXT'),
('config', 'c_value_trans', '?LONG_TRANS'),
('config', 'c_needs_dereference', 'BINARY'),
('group_privileges', 'group_id', '*INTEGER'),
('group_privileges', 'privilege', '*ID_TEXT'),
('group_privileges', 'the_page', '*ID_TEXT'),
('group_privileges', 'module_the_name', '*ID_TEXT'),
('group_privileges', 'category_name', '*ID_TEXT'),
('group_privileges', 'the_value', 'BINARY'),
('privilege_list', 'p_section', 'ID_TEXT'),
('privilege_list', 'the_name', '*ID_TEXT'),
('privilege_list', 'the_default', '*BINARY'),
('attachments', 'id', '*AUTO'),
('attachments', 'a_member_id', 'MEMBER'),
('attachments', 'a_file_size', '?INTEGER'),
('attachments', 'a_url', 'SHORT_TEXT'),
('attachments', 'a_description', 'SHORT_TEXT'),
('attachments', 'a_thumb_url', 'SHORT_TEXT'),
('attachments', 'a_original_filename', 'SHORT_TEXT'),
('attachments', 'a_num_downloads', 'INTEGER'),
('attachments', 'a_last_downloaded_time', '?INTEGER'),
('attachments', 'a_add_time', 'INTEGER'),
('attachment_refs', 'id', '*AUTO'),
('attachment_refs', 'r_referer_type', 'ID_TEXT'),
('attachment_refs', 'r_referer_id', 'ID_TEXT'),
('attachment_refs', 'a_id', 'AUTO_LINK'),
('zones', 'zone_name', '*ID_TEXT'),
('zones', 'zone_title', 'SHORT_TRANS'),
('zones', 'zone_default_page', 'ID_TEXT');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('zones', 'zone_header_text', 'SHORT_TRANS'),
('zones', 'zone_theme', 'ID_TEXT'),
('zones', 'zone_require_session', 'BINARY'),
('modules', 'module_the_name', '*ID_TEXT'),
('modules', 'module_author', 'ID_TEXT'),
('modules', 'module_organisation', 'ID_TEXT'),
('modules', 'module_hacked_by', 'ID_TEXT'),
('modules', 'module_hack_version', '?INTEGER'),
('modules', 'module_version', 'INTEGER'),
('blocks', 'block_name', '*ID_TEXT'),
('blocks', 'block_author', 'ID_TEXT'),
('blocks', 'block_organisation', 'ID_TEXT'),
('blocks', 'block_hacked_by', 'ID_TEXT'),
('blocks', 'block_hack_version', '?INTEGER'),
('blocks', 'block_version', 'INTEGER'),
('sessions', 'the_session', '*ID_TEXT'),
('sessions', 'last_activity', 'TIME'),
('sessions', 'member_id', 'MEMBER'),
('sessions', 'ip', 'IP'),
('sessions', 'session_confirmed', 'BINARY'),
('sessions', 'session_invisible', 'BINARY'),
('sessions', 'cache_username', 'SHORT_TEXT'),
('sessions', 'the_zone', 'ID_TEXT'),
('sessions', 'the_page', 'ID_TEXT'),
('sessions', 'the_type', 'ID_TEXT'),
('sessions', 'the_id', 'ID_TEXT'),
('sessions', 'the_title', 'SHORT_TEXT'),
('https_pages', 'https_page_name', '*ID_TEXT'),
('group_category_access', 'module_the_name', '*ID_TEXT'),
('group_category_access', 'category_name', '*ID_TEXT'),
('group_category_access', 'group_id', '*GROUP'),
('seo_meta', 'id', '*AUTO'),
('seo_meta', 'meta_for_type', 'ID_TEXT'),
('seo_meta', 'meta_for_id', 'ID_TEXT'),
('seo_meta', 'meta_description', 'LONG_TRANS'),
('seo_meta_keywords', 'id', '*AUTO'),
('seo_meta_keywords', 'meta_for_type', 'ID_TEXT'),
('seo_meta_keywords', 'meta_for_id', 'ID_TEXT'),
('seo_meta_keywords', 'meta_keyword', 'SHORT_TRANS'),
('f_group_join_log', 'id', '*AUTO');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('f_group_join_log', 'member_id', 'MEMBER'),
('f_group_join_log', 'usergroup_id', '?AUTO_LINK'),
('f_group_join_log', 'join_time', 'TIME'),
('f_password_history', 'id', '*AUTO'),
('f_password_history', 'p_member_id', 'MEMBER'),
('f_password_history', 'p_hash_salted', 'SHORT_TEXT'),
('f_password_history', 'p_salt', 'SHORT_TEXT'),
('f_password_history', 'p_time', 'TIME'),
('f_member_cpf_perms', 'member_id', '*MEMBER'),
('f_member_cpf_perms', 'field_id', '*AUTO_LINK'),
('f_member_cpf_perms', 'guest_view', 'BINARY'),
('f_member_cpf_perms', 'member_view', 'BINARY'),
('f_member_cpf_perms', 'friend_view', 'BINARY'),
('f_member_cpf_perms', 'group_view', 'SHORT_TEXT'),
('f_emoticons', 'e_code', '*ID_TEXT'),
('f_emoticons', 'e_theme_img_code', 'SHORT_TEXT'),
('f_emoticons', 'e_relevance_level', 'INTEGER'),
('f_emoticons', 'e_use_topics', 'BINARY'),
('f_emoticons', 'e_is_special', 'BINARY');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('f_custom_fields', 'id', '*AUTO'),
('f_custom_fields', 'cf_locked', 'BINARY'),
('f_custom_fields', 'cf_name', 'SHORT_TRANS'),
('f_custom_fields', 'cf_description', 'LONG_TRANS'),
('f_custom_fields', 'cf_default', 'LONG_TEXT'),
('f_custom_fields', 'cf_public_view', 'BINARY'),
('f_custom_fields', 'cf_owner_view', 'BINARY'),
('f_custom_fields', 'cf_owner_set', 'BINARY'),
('f_custom_fields', 'cf_type', 'ID_TEXT'),
('f_custom_fields', 'cf_required', 'BINARY'),
('f_custom_fields', 'cf_show_in_posts', 'BINARY'),
('f_custom_fields', 'cf_show_in_post_previews', 'BINARY'),
('f_custom_fields', 'cf_order', 'INTEGER'),
('f_custom_fields', 'cf_only_group', 'LONG_TEXT'),
('f_custom_fields', 'cf_encrypted', 'BINARY'),
('f_custom_fields', 'cf_show_on_join_form', 'BINARY'),
('f_custom_fields', 'cf_options', 'SHORT_TEXT'),
('f_member_custom_fields', 'mf_member_id', '*MEMBER'),
('f_member_custom_fields', 'field_1', 'LONG_TRANS__COMCODE'),
('f_member_custom_fields', 'field_2', 'LONG_TRANS__COMCODE'),
('f_member_custom_fields', 'field_3', 'SHORT_TEXT'),
('f_member_custom_fields', 'field_4', 'LONG_TRANS__COMCODE'),
('f_member_custom_fields', 'field_5', 'SHORT_TEXT'),
('f_member_custom_fields', 'field_6', 'SHORT_TEXT'),
('f_member_custom_fields', 'field_7', 'SHORT_TEXT'),
('f_member_custom_fields', 'field_8', 'SHORT_TEXT'),
('f_invites', 'id', '*AUTO'),
('f_invites', 'i_inviter', 'MEMBER'),
('f_invites', 'i_email_address', 'SHORT_TEXT'),
('f_invites', 'i_time', 'TIME'),
('f_invites', 'i_taken', 'BINARY'),
('f_group_members', 'gm_group_id', '*GROUP'),
('f_group_members', 'gm_member_id', '*MEMBER'),
('f_group_members', 'gm_validated', 'BINARY'),
('f_members', 'id', '*AUTO'),
('f_members', 'm_username', 'ID_TEXT'),
('f_members', 'm_pass_hash_salted', 'SHORT_TEXT'),
('f_members', 'm_pass_salt', 'SHORT_TEXT'),
('f_members', 'm_theme', 'ID_TEXT'),
('f_members', 'm_avatar_url', 'URLPATH'),
('f_members', 'm_validated', 'BINARY');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('f_members', 'm_validated_email_confirm_code', 'SHORT_TEXT'),
('f_members', 'm_cache_num_posts', 'INTEGER'),
('f_members', 'm_cache_warnings', 'INTEGER'),
('f_members', 'm_join_time', 'TIME'),
('f_members', 'm_timezone_offset', 'SHORT_TEXT'),
('f_members', 'm_primary_group', 'GROUP'),
('f_members', 'm_last_visit_time', 'TIME'),
('f_members', 'm_last_submit_time', 'TIME'),
('f_members', 'm_signature', 'LONG_TRANS__COMCODE'),
('f_members', 'm_is_perm_banned', 'BINARY'),
('f_members', 'm_preview_posts', 'BINARY'),
('f_members', 'm_dob_day', '?SHORT_INTEGER'),
('f_members', 'm_dob_month', '?SHORT_INTEGER'),
('f_members', 'm_dob_year', '?INTEGER'),
('f_members', 'm_reveal_age', 'BINARY'),
('f_members', 'm_email_address', 'SHORT_TEXT'),
('f_members', 'm_title', 'SHORT_TEXT'),
('f_members', 'm_photo_url', 'URLPATH'),
('f_members', 'm_photo_thumb_url', 'URLPATH'),
('f_members', 'm_views_signatures', 'BINARY'),
('f_members', 'm_auto_monitor_contrib_content', 'BINARY'),
('f_members', 'm_language', 'ID_TEXT'),
('f_members', 'm_ip_address', 'IP'),
('f_members', 'm_allow_emails', 'BINARY'),
('f_members', 'm_allow_emails_from_staff', 'BINARY'),
('f_members', 'm_highlighted_name', 'BINARY'),
('f_members', 'm_pt_allow', 'SHORT_TEXT'),
('f_members', 'm_pt_rules_text', 'LONG_TRANS__COMCODE'),
('f_members', 'm_max_email_attach_size_mb', 'INTEGER'),
('f_members', 'm_password_change_code', 'SHORT_TEXT'),
('f_members', 'm_password_compat_scheme', 'ID_TEXT'),
('f_members', 'm_on_probation_until', '?TIME'),
('f_members', 'm_profile_views', 'UINTEGER'),
('f_members', 'm_total_sessions', 'UINTEGER'),
('f_members', 'm_auto_mark_read', 'BINARY'),
('f_groups', 'id', '*AUTO'),
('f_groups', 'g_name', 'SHORT_TRANS'),
('f_groups', 'g_is_default', 'BINARY'),
('f_groups', 'g_is_presented_at_install', 'BINARY'),
('f_groups', 'g_is_super_admin', 'BINARY');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('f_groups', 'g_is_super_moderator', 'BINARY'),
('f_groups', 'g_group_leader', '?MEMBER'),
('f_groups', 'g_title', 'SHORT_TRANS'),
('f_groups', 'g_promotion_target', '?GROUP'),
('f_groups', 'g_promotion_threshold', '?INTEGER'),
('f_groups', 'g_flood_control_submit_secs', 'INTEGER'),
('f_groups', 'g_flood_control_access_secs', 'INTEGER'),
('f_groups', 'g_gift_points_base', 'INTEGER'),
('f_groups', 'g_gift_points_per_day', 'INTEGER'),
('f_groups', 'g_max_daily_upload_mb', 'INTEGER'),
('f_groups', 'g_max_attachments_per_post', 'INTEGER'),
('f_groups', 'g_max_avatar_width', 'INTEGER'),
('f_groups', 'g_max_avatar_height', 'INTEGER'),
('f_groups', 'g_max_post_length_comcode', 'INTEGER'),
('f_groups', 'g_max_sig_length_comcode', 'INTEGER'),
('f_groups', 'g_enquire_on_new_ips', 'BINARY'),
('f_groups', 'g_rank_image', 'ID_TEXT'),
('f_groups', 'g_hidden', 'BINARY'),
('f_groups', 'g_order', 'INTEGER');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('f_groups', 'g_rank_image_pri_only', 'BINARY'),
('f_groups', 'g_open_membership', 'BINARY'),
('f_groups', 'g_is_private_club', 'BINARY'),
('group_page_access', 'page_name', '*ID_TEXT'),
('match_key_messages', 'id', '*AUTO'),
('match_key_messages', 'k_message', 'LONG_TRANS__COMCODE'),
('match_key_messages', 'k_match_key', 'SHORT_TEXT'),
('group_zone_access', 'zone_name', '*ID_TEXT'),
('group_zone_access', 'group_id', '*GROUP'),
('f_forum_groupings', 'id', '*AUTO'),
('f_forum_groupings', 'c_title', 'SHORT_TEXT'),
('f_forum_groupings', 'c_description', 'LONG_TEXT'),
('f_forum_groupings', 'c_expanded_by_default', 'BINARY'),
('f_forums', 'id', '*AUTO'),
('f_forums', 'f_name', 'SHORT_TEXT'),
('f_forums', 'f_description', 'LONG_TRANS__COMCODE'),
('f_forums', 'f_forum_grouping_id', '?AUTO_LINK'),
('f_forums', 'f_parent_forum', '?AUTO_LINK'),
('f_forums', 'f_position', 'INTEGER'),
('f_forums', 'f_order_sub_alpha', 'BINARY'),
('f_forums', 'f_post_count_increment', 'BINARY'),
('f_forums', 'f_intro_question', 'LONG_TRANS__COMCODE'),
('f_forums', 'f_intro_answer', 'SHORT_TEXT'),
('f_forums', 'f_cache_num_topics', 'INTEGER'),
('f_forums', 'f_cache_num_posts', 'INTEGER'),
('f_forums', 'f_cache_last_topic_id', '?AUTO_LINK'),
('f_forums', 'f_cache_last_title', 'SHORT_TEXT'),
('f_forums', 'f_cache_last_time', '?TIME'),
('f_forums', 'f_cache_last_username', 'SHORT_TEXT'),
('f_forums', 'f_cache_last_member_id', '?MEMBER'),
('f_forums', 'f_cache_last_forum_id', '?AUTO_LINK'),
('f_forums', 'f_redirection', 'SHORT_TEXT'),
('f_forums', 'f_order', 'ID_TEXT'),
('f_forums', 'f_is_threaded', 'BINARY'),
('f_forums', 'f_allows_anonymous_posts', 'BINARY'),
('f_topics', 'id', '*AUTO'),
('f_topics', 't_pinned', 'BINARY'),
('f_topics', 't_sunk', 'BINARY'),
('f_topics', 't_cascading', 'BINARY'),
('f_topics', 't_forum_id', '?AUTO_LINK'),
('f_topics', 't_pt_from', '?MEMBER');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('f_topics', 't_pt_to', '?MEMBER'),
('f_topics', 't_pt_from_category', 'SHORT_TEXT'),
('f_topics', 't_pt_to_category', 'SHORT_TEXT'),
('f_topics', 't_description', 'SHORT_TEXT'),
('f_topics', 't_description_link', 'SHORT_TEXT'),
('f_topics', 't_emoticon', 'SHORT_TEXT'),
('f_topics', 't_num_views', 'INTEGER'),
('f_topics', 't_validated', 'BINARY'),
('f_topics', 't_is_open', 'BINARY'),
('f_topics', 't_poll_id', '?AUTO_LINK'),
('f_topics', 't_cache_first_post_id', '?AUTO_LINK'),
('f_topics', 't_cache_first_time', '?TIME'),
('f_topics', 't_cache_first_title', 'SHORT_TEXT'),
('f_topics', 't_cache_first_post', '?LONG_TRANS__COMCODE'),
('f_topics', 't_cache_first_username', 'ID_TEXT'),
('f_topics', 't_cache_first_member_id', '?MEMBER'),
('f_topics', 't_cache_last_post_id', '?AUTO_LINK'),
('f_topics', 't_cache_last_time', '?TIME'),
('f_topics', 't_cache_last_title', 'SHORT_TEXT'),
('f_topics', 't_cache_last_username', 'ID_TEXT'),
('f_topics', 't_cache_last_member_id', '?MEMBER'),
('f_topics', 't_cache_num_posts', 'INTEGER'),
('f_posts', 'id', '*AUTO'),
('f_posts', 'p_title', 'SHORT_TEXT'),
('f_posts', 'p_post', 'LONG_TRANS__COMCODE'),
('f_posts', 'p_ip_address', 'IP'),
('f_posts', 'p_time', 'TIME'),
('f_posts', 'p_poster', 'MEMBER'),
('f_posts', 'p_intended_solely_for', '?MEMBER'),
('f_posts', 'p_poster_name_if_guest', 'ID_TEXT'),
('f_posts', 'p_validated', 'BINARY'),
('f_posts', 'p_topic_id', 'AUTO_LINK'),
('f_posts', 'p_cache_forum_id', '?AUTO_LINK'),
('f_posts', 'p_last_edit_time', '?TIME'),
('f_posts', 'p_last_edit_by', '?MEMBER'),
('f_posts', 'p_is_emphasised', 'BINARY'),
('f_posts', 'p_skip_sig', 'BINARY'),
('f_posts', 'p_parent_id', '?AUTO_LINK'),
('f_special_pt_access', 's_member_id', '*MEMBER'),
('f_special_pt_access', 's_topic_id', '*AUTO_LINK');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('f_saved_warnings', 's_title', '*SHORT_TEXT'),
('f_saved_warnings', 's_explanation', 'LONG_TEXT'),
('f_saved_warnings', 's_message', 'LONG_TEXT'),
('f_forum_intro_ip', 'i_forum_id', '*AUTO_LINK'),
('f_forum_intro_ip', 'i_ip', '*IP'),
('f_forum_intro_member', 'i_forum_id', '*AUTO_LINK'),
('f_forum_intro_member', 'i_member_id', '*MEMBER'),
('f_post_templates', 'id', '*AUTO'),
('f_post_templates', 't_title', 'SHORT_TEXT'),
('f_post_templates', 't_text', 'LONG_TEXT'),
('f_post_templates', 't_forum_multi_code', 'SHORT_TEXT'),
('f_post_templates', 't_use_default_forums', 'BINARY'),
('f_polls', 'id', '*AUTO'),
('f_polls', 'po_question', 'SHORT_TEXT'),
('f_polls', 'po_cache_total_votes', 'INTEGER'),
('f_polls', 'po_is_private', 'BINARY'),
('f_polls', 'po_is_open', 'BINARY'),
('f_polls', 'po_minimum_selections', 'INTEGER'),
('f_polls', 'po_maximum_selections', 'INTEGER');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('f_polls', 'po_requires_reply', 'BINARY'),
('f_poll_answers', 'id', '*AUTO'),
('f_poll_answers', 'pa_poll_id', 'AUTO_LINK'),
('f_poll_answers', 'pa_answer', 'SHORT_TEXT'),
('f_poll_answers', 'pa_cache_num_votes', 'INTEGER'),
('f_poll_votes', 'id', '*AUTO'),
('f_poll_votes', 'pv_poll_id', 'AUTO_LINK'),
('f_poll_votes', 'pv_member_id', 'MEMBER'),
('f_poll_votes', 'pv_answer_id', 'AUTO_LINK'),
('f_poll_votes', 'pv_ip', 'IP'),
('f_multi_moderations', 'id', '*AUTO'),
('f_multi_moderations', 'mm_name', 'SHORT_TRANS'),
('f_multi_moderations', 'mm_post_text', 'LONG_TEXT'),
('f_multi_moderations', 'mm_move_to', '?AUTO_LINK'),
('f_multi_moderations', 'mm_pin_state', '?BINARY'),
('f_multi_moderations', 'mm_sink_state', '?BINARY'),
('f_multi_moderations', 'mm_open_state', '?BINARY'),
('f_multi_moderations', 'mm_forum_multi_code', 'SHORT_TEXT'),
('f_multi_moderations', 'mm_title_suffix', 'SHORT_TEXT'),
('f_warnings', 'id', '*AUTO'),
('f_warnings', 'w_member_id', 'MEMBER'),
('f_warnings', 'w_time', 'TIME'),
('f_warnings', 'w_explanation', 'LONG_TEXT'),
('f_warnings', 'w_by', 'MEMBER'),
('f_warnings', 'w_is_warning', 'BINARY'),
('f_warnings', 'p_silence_from_topic', '?AUTO_LINK'),
('f_warnings', 'p_silence_from_forum', '?AUTO_LINK'),
('f_warnings', 'p_probation', 'INTEGER'),
('f_warnings', 'p_banned_ip', 'IP'),
('f_warnings', 'p_charged_points', 'INTEGER'),
('f_warnings', 'p_banned_member', 'BINARY'),
('f_warnings', 'p_changed_usergroup_from', '?GROUP'),
('f_moderator_logs', 'id', '*AUTO'),
('f_moderator_logs', 'l_the_type', 'ID_TEXT'),
('f_moderator_logs', 'l_param_a', 'SHORT_TEXT'),
('f_moderator_logs', 'l_param_b', 'SHORT_TEXT'),
('f_moderator_logs', 'l_date_and_time', 'TIME'),
('f_moderator_logs', 'l_reason', 'LONG_TEXT'),
('f_moderator_logs', 'l_by', 'MEMBER'),
('f_member_known_login_ips', 'i_member_id', '*MEMBER'),
('f_member_known_login_ips', 'i_ip', '*IP');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('f_member_known_login_ips', 'i_val_code', 'SHORT_TEXT'),
('f_read_logs', 'l_member_id', '*MEMBER'),
('f_read_logs', 'l_topic_id', '*AUTO_LINK'),
('f_read_logs', 'l_time', 'TIME'),
('menu_items', 'id', '*AUTO'),
('menu_items', 'i_menu', 'ID_TEXT'),
('menu_items', 'i_order', 'INTEGER'),
('menu_items', 'i_parent', '?AUTO_LINK'),
('menu_items', 'i_caption', 'SHORT_TRANS__COMCODE'),
('menu_items', 'i_caption_long', 'SHORT_TRANS__COMCODE'),
('menu_items', 'i_url', 'SHORT_TEXT'),
('menu_items', 'i_check_permissions', 'BINARY'),
('menu_items', 'i_expanded', 'BINARY'),
('menu_items', 'i_new_window', 'BINARY'),
('menu_items', 'i_include_sitemap', 'SHORT_INTEGER'),
('menu_items', 'i_page_only', 'ID_TEXT'),
('menu_items', 'i_theme_img_code', 'ID_TEXT'),
('trackbacks', 'id', '*AUTO'),
('trackbacks', 'trackback_for_type', 'ID_TEXT'),
('trackbacks', 'trackback_for_id', 'ID_TEXT'),
('trackbacks', 'trackback_ip', 'IP'),
('trackbacks', 'trackback_time', 'TIME'),
('trackbacks', 'trackback_url', 'SHORT_TEXT'),
('trackbacks', 'trackback_title', 'SHORT_TEXT'),
('trackbacks', 'trackback_excerpt', 'LONG_TEXT'),
('trackbacks', 'trackback_name', 'SHORT_TEXT'),
('captchas', 'si_session_id', '*ID_TEXT'),
('captchas', 'si_time', 'TIME'),
('captchas', 'si_code', 'ID_TEXT'),
('member_tracking', 'mt_member_id', '*MEMBER'),
('member_tracking', 'mt_cache_username', 'ID_TEXT'),
('member_tracking', 'mt_time', '*TIME'),
('member_tracking', 'mt_page', '*ID_TEXT'),
('member_tracking', 'mt_type', '*ID_TEXT'),
('member_tracking', 'mt_id', '*ID_TEXT'),
('cache_on', 'cached_for', '*ID_TEXT'),
('cache_on', 'cache_on', 'LONG_TEXT'),
('cache_on', 'special_cache_flags', 'INTEGER'),
('cache_on', 'cache_ttl', 'INTEGER'),
('webstandards_checked_once', 'hash', '*SHORT_TEXT');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('edit_pings', 'id', '*AUTO'),
('edit_pings', 'the_page', 'ID_TEXT'),
('edit_pings', 'the_type', 'ID_TEXT'),
('edit_pings', 'the_id', 'ID_TEXT'),
('edit_pings', 'the_time', 'TIME'),
('edit_pings', 'the_member', 'MEMBER'),
('values_elective', 'the_name', '*ID_TEXT'),
('values_elective', 'the_value', 'LONG_TEXT'),
('values_elective', 'date_and_time', 'TIME'),
('tutorial_links', 'the_name', '*ID_TEXT'),
('tutorial_links', 'the_value', 'LONG_TEXT'),
('member_privileges', 'member_id', '*INTEGER'),
('member_privileges', 'privilege', '*ID_TEXT'),
('member_privileges', 'the_page', '*ID_TEXT'),
('member_privileges', 'module_the_name', '*ID_TEXT'),
('member_privileges', 'category_name', '*ID_TEXT'),
('member_privileges', 'the_value', 'BINARY'),
('member_privileges', 'active_until', '?TIME'),
('member_zone_access', 'zone_name', '*ID_TEXT');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('member_zone_access', 'member_id', '*MEMBER'),
('member_zone_access', 'active_until', '?TIME'),
('member_page_access', 'page_name', '*ID_TEXT'),
('member_page_access', 'zone_name', '*ID_TEXT'),
('member_page_access', 'member_id', '*MEMBER'),
('member_page_access', 'active_until', '?TIME'),
('member_category_access', 'module_the_name', '*ID_TEXT'),
('member_category_access', 'category_name', '*ID_TEXT'),
('member_category_access', 'member_id', '*MEMBER'),
('member_category_access', 'active_until', '?TIME'),
('autosave', 'id', '*AUTO'),
('autosave', 'a_member_id', 'MEMBER'),
('autosave', 'a_key', 'LONG_TEXT'),
('autosave', 'a_value', 'LONG_TEXT'),
('autosave', 'a_time', 'TIME'),
('messages_to_render', 'id', '*AUTO'),
('messages_to_render', 'r_session_id', 'ID_TEXT'),
('messages_to_render', 'r_message', 'LONG_TEXT'),
('messages_to_render', 'r_type', 'ID_TEXT'),
('messages_to_render', 'r_time', 'TIME'),
('url_title_cache', 'id', '*AUTO'),
('url_title_cache', 't_url', 'URLPATH'),
('url_title_cache', 't_title', 'SHORT_TEXT'),
('url_title_cache', 't_meta_title', 'LONG_TEXT'),
('url_title_cache', 't_keywords', 'LONG_TEXT'),
('url_title_cache', 't_description', 'LONG_TEXT'),
('url_title_cache', 't_image_url', 'URLPATH'),
('url_title_cache', 't_mime_type', 'ID_TEXT'),
('url_title_cache', 't_json_discovery', 'URLPATH'),
('url_title_cache', 't_xml_discovery', 'URLPATH'),
('rating', 'id', '*AUTO'),
('rating', 'rating_for_type', 'ID_TEXT'),
('rating', 'rating_for_id', 'ID_TEXT'),
('rating', 'rating_member', 'MEMBER'),
('rating', 'rating_ip', 'IP'),
('rating', 'rating_time', 'TIME'),
('rating', 'rating', 'SHORT_INTEGER'),
('comcode_pages', 'the_zone', '*ID_TEXT'),
('comcode_pages', 'the_page', '*ID_TEXT'),
('comcode_pages', 'p_parent_page', 'ID_TEXT'),
('comcode_pages', 'p_validated', 'BINARY');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('comcode_pages', 'p_edit_date', '?TIME'),
('comcode_pages', 'p_add_date', 'TIME'),
('comcode_pages', 'p_submitter', 'MEMBER'),
('comcode_pages', 'p_show_as_edit', 'BINARY'),
('comcode_pages', 'p_order', 'INTEGER'),
('cached_comcode_pages', 'the_zone', '*ID_TEXT'),
('cached_comcode_pages', 'the_page', '*ID_TEXT'),
('cached_comcode_pages', 'string_index', 'LONG_TRANS__COMCODE'),
('cached_comcode_pages', 'the_theme', '*ID_TEXT'),
('cached_comcode_pages', 'cc_page_title', '?SHORT_TRANS'),
('url_id_monikers', 'id', '*AUTO'),
('url_id_monikers', 'm_resource_page', 'ID_TEXT'),
('url_id_monikers', 'm_resource_type', 'ID_TEXT'),
('url_id_monikers', 'm_resource_id', 'ID_TEXT'),
('url_id_monikers', 'm_moniker', 'SHORT_TEXT'),
('url_id_monikers', 'm_moniker_reversed', 'SHORT_TEXT'),
('url_id_monikers', 'm_deprecated', 'BINARY'),
('url_id_monikers', 'm_manually_chosen', 'BINARY'),
('review_supplement', 'r_post_id', '*AUTO_LINK'),
('review_supplement', 'r_rating_type', '*ID_TEXT'),
('review_supplement', 'r_rating', 'SHORT_INTEGER'),
('review_supplement', 'r_topic_id', 'AUTO_LINK'),
('review_supplement', 'r_rating_for_id', 'ID_TEXT'),
('review_supplement', 'r_rating_for_type', 'ID_TEXT'),
('logged_mail_messages', 'id', '*AUTO'),
('logged_mail_messages', 'm_subject', 'LONG_TEXT'),
('logged_mail_messages', 'm_message', 'LONG_TEXT'),
('logged_mail_messages', 'm_to_email', 'LONG_TEXT'),
('logged_mail_messages', 'm_extra_cc_addresses', 'LONG_TEXT'),
('logged_mail_messages', 'm_extra_bcc_addresses', 'LONG_TEXT'),
('logged_mail_messages', 'm_join_time', '?TIME'),
('logged_mail_messages', 'm_to_name', 'LONG_TEXT'),
('logged_mail_messages', 'm_from_email', 'SHORT_TEXT'),
('logged_mail_messages', 'm_from_name', 'SHORT_TEXT'),
('logged_mail_messages', 'm_priority', 'SHORT_INTEGER'),
('logged_mail_messages', 'm_attachments', 'LONG_TEXT'),
('logged_mail_messages', 'm_no_cc', 'BINARY'),
('logged_mail_messages', 'm_as', 'MEMBER'),
('logged_mail_messages', 'm_as_admin', 'BINARY'),
('logged_mail_messages', 'm_in_html', 'BINARY');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('logged_mail_messages', 'm_date_and_time', 'TIME'),
('logged_mail_messages', 'm_member_id', 'MEMBER'),
('logged_mail_messages', 'm_url', 'LONG_TEXT'),
('logged_mail_messages', 'm_queued', 'BINARY'),
('logged_mail_messages', 'm_template', 'ID_TEXT'),
('link_tracker', 'id', '*AUTO'),
('link_tracker', 'c_date_and_time', 'TIME'),
('link_tracker', 'c_member_id', 'MEMBER'),
('link_tracker', 'c_ip_address', 'IP'),
('link_tracker', 'c_url', 'URLPATH'),
('incoming_uploads', 'id', '*AUTO'),
('incoming_uploads', 'i_submitter', 'MEMBER'),
('incoming_uploads', 'i_date_and_time', 'TIME'),
('incoming_uploads', 'i_orig_filename', 'URLPATH'),
('incoming_uploads', 'i_save_url', 'SHORT_TEXT'),
('cache', 'id', '*AUTO'),
('cache', 'cached_for', 'ID_TEXT'),
('cache', 'identifier', 'MINIID_TEXT'),
('cache', 'the_theme', 'MINIID_TEXT');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('cache', 'staff_status', '?BINARY'),
('cache', 'the_member', '?MEMBER'),
('cache', 'groups', 'SHORT_TEXT'),
('cache', 'is_bot', '?BINARY'),
('cache', 'timezone', 'MINIID_TEXT'),
('cache', 'lang', 'LANGUAGE_NAME'),
('cache', 'the_value', 'LONG_TEXT'),
('cache', 'dependencies', 'LONG_TEXT'),
('cache', 'date_and_time', 'TIME'),
('f_group_member_timeouts', 'member_id', '*MEMBER'),
('f_group_member_timeouts', 'group_id', '*GROUP'),
('f_group_member_timeouts', 'timeout', 'TIME'),
('temp_block_permissions', 'id', '*AUTO'),
('temp_block_permissions', 'p_session_id', 'ID_TEXT'),
('temp_block_permissions', 'p_block_constraints', 'LONG_TEXT'),
('temp_block_permissions', 'p_time', 'TIME'),
('cron_caching_requests', 'id', '*AUTO'),
('cron_caching_requests', 'c_codename', 'ID_TEXT'),
('cron_caching_requests', 'c_map', 'LONG_TEXT'),
('cron_caching_requests', 'c_lang', 'LANGUAGE_NAME'),
('cron_caching_requests', 'c_theme', 'ID_TEXT'),
('cron_caching_requests', 'c_staff_status', '?BINARY'),
('cron_caching_requests', 'c_member', '?MEMBER'),
('cron_caching_requests', 'c_groups', 'SHORT_TEXT'),
('cron_caching_requests', 'c_is_bot', '?BINARY'),
('cron_caching_requests', 'c_timezone', 'MINIID_TEXT'),
('cron_caching_requests', 'c_store_as_tempcode', 'BINARY'),
('notifications_enabled', 'id', '*AUTO'),
('notifications_enabled', 'l_member_id', 'MEMBER'),
('notifications_enabled', 'l_notification_code', 'ID_TEXT'),
('notifications_enabled', 'l_code_category', 'SHORT_TEXT'),
('notifications_enabled', 'l_setting', 'INTEGER'),
('digestives_tin', 'id', '*AUTO'),
('digestives_tin', 'd_subject', 'LONG_TEXT'),
('digestives_tin', 'd_message', 'LONG_TRANS__COMCODE'),
('digestives_tin', 'd_from_member_id', '?MEMBER'),
('digestives_tin', 'd_to_member_id', 'MEMBER'),
('digestives_tin', 'd_priority', 'SHORT_INTEGER'),
('digestives_tin', 'd_no_cc', 'BINARY'),
('digestives_tin', 'd_date_and_time', 'TIME'),
('digestives_tin', 'd_notification_code', 'ID_TEXT');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('digestives_tin', 'd_code_category', 'SHORT_TEXT'),
('digestives_tin', 'd_frequency', 'INTEGER'),
('digestives_tin', 'd_read', 'BINARY'),
('digestives_consumed', 'c_member_id', '*MEMBER'),
('digestives_consumed', 'c_frequency', '*INTEGER'),
('digestives_consumed', 'c_time', 'TIME'),
('alternative_ids', 'resource_type', '*ID_TEXT'),
('alternative_ids', 'resource_id', '*ID_TEXT'),
('alternative_ids', 'resource_moniker', 'ID_TEXT'),
('alternative_ids', 'resource_label', 'SHORT_TEXT'),
('alternative_ids', 'resource_guid', 'ID_TEXT'),
('alternative_ids', 'resource_resource_fs_hook', 'ID_TEXT'),
('f_member_custom_fields', 'field_9', '?INTEGER'),
('email_bounces', 'id', '*AUTO'),
('email_bounces', 'b_email_address', 'SHORT_TEXT'),
('email_bounces', 'b_time', 'TIME'),
('email_bounces', 'b_subject', 'SHORT_TEXT'),
('email_bounces', 'b_body', 'LONG_TEXT'),
('content_privacy', 'content_type', '*ID_TEXT'),
('content_privacy', 'content_id', '*ID_TEXT'),
('content_privacy', 'guest_view', 'BINARY'),
('content_privacy', 'member_view', 'BINARY'),
('content_privacy', 'friend_view', 'BINARY'),
('content_privacy__members', 'content_type', '*ID_TEXT'),
('content_privacy__members', 'content_id', '*ID_TEXT'),
('content_privacy__members', 'member_id', '*MEMBER'),
('task_queue', 'id', '*AUTO'),
('task_queue', 't_title', 'SHORT_TEXT'),
('task_queue', 't_hook', 'ID_TEXT'),
('task_queue', 't_args', 'LONG_TEXT'),
('task_queue', 't_member_id', 'MEMBER'),
('task_queue', 't_secure_ref', 'ID_TEXT'),
('task_queue', 't_send_notification', 'BINARY'),
('task_queue', 't_locked', 'BINARY'),
('sitemap_cache', 'page_link', '*SHORT_TEXT'),
('sitemap_cache', 'set_number', 'INTEGER'),
('sitemap_cache', 'add_date', '?TIME'),
('sitemap_cache', 'edit_date', '?TIME'),
('sitemap_cache', 'last_updated', 'TIME'),
('sitemap_cache', 'is_deleted', 'BINARY');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('sitemap_cache', 'priority', 'REAL'),
('sitemap_cache', 'refreshfreq', 'ID_TEXT'),
('sitemap_cache', 'guest_access', 'BINARY'),
('urls_checked', 'id', '*AUTO'),
('urls_checked', 'url', 'LONG_TEXT'),
('urls_checked', 'url_exists', 'BINARY'),
('urls_checked', 'url_check_time', 'TIME'),
('content_regions', 'content_type', '*ID_TEXT'),
('content_regions', 'content_id', '*ID_TEXT'),
('content_regions', 'region', '*ID_TEXT'),
('unbannable_ip', 'ip', '*IP'),
('unbannable_ip', 'note', 'SHORT_TEXT'),
('post_tokens', 'token', '*ID_TEXT'),
('post_tokens', 'generation_time', 'TIME'),
('post_tokens', 'member_id', 'MEMBER'),
('post_tokens', 'session_id', 'ID_TEXT'),
('post_tokens', 'ip_address', 'IP'),
('post_tokens', 'usage_tally', 'INTEGER'),
('group_page_access', 'zone_name', '*ID_TEXT');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('group_page_access', 'group_id', '*GROUP'),
('addons', 'addon_name', '*SHORT_TEXT'),
('addons', 'addon_author', 'SHORT_TEXT'),
('addons', 'addon_organisation', 'SHORT_TEXT'),
('addons', 'addon_version', 'SHORT_TEXT'),
('addons', 'addon_category', 'SHORT_TEXT'),
('addons', 'addon_copyright_attribution', 'SHORT_TEXT'),
('addons', 'addon_licence', 'SHORT_TEXT'),
('addons', 'addon_description', 'LONG_TEXT'),
('addons', 'addon_install_time', 'TIME'),
('addons_files', 'id', '*AUTO'),
('addons_files', 'addon_name', 'SHORT_TEXT'),
('addons_files', 'filename', 'SHORT_TEXT'),
('addons_dependencies', 'id', '*AUTO'),
('addons_dependencies', 'addon_name', 'SHORT_TEXT'),
('addons_dependencies', 'addon_name_dependant_upon', 'SHORT_TEXT'),
('addons_dependencies', 'addon_name_incompatibility', 'BINARY'),
('aggregate_type_instances', 'id', '*AUTO'),
('aggregate_type_instances', 'aggregate_label', 'SHORT_TEXT'),
('aggregate_type_instances', 'aggregate_type', 'ID_TEXT'),
('aggregate_type_instances', 'other_parameters', 'LONG_TEXT'),
('aggregate_type_instances', 'add_time', 'TIME'),
('aggregate_type_instances', 'edit_time', '?TIME'),
('award_archive', 'a_type_id', '*AUTO_LINK'),
('award_archive', 'date_and_time', '*TIME'),
('award_archive', 'content_id', 'ID_TEXT'),
('award_archive', 'member_id', 'MEMBER'),
('award_types', 'id', '*AUTO'),
('award_types', 'a_title', 'SHORT_TRANS'),
('award_types', 'a_description', 'LONG_TRANS__COMCODE'),
('award_types', 'a_points', 'INTEGER'),
('award_types', 'a_content_type', 'ID_TEXT'),
('award_types', 'a_hide_awardee', 'BINARY'),
('award_types', 'a_update_time_hours', 'INTEGER'),
('f_welcome_emails', 'id', '*AUTO'),
('f_welcome_emails', 'w_name', 'SHORT_TEXT'),
('f_welcome_emails', 'w_subject', 'SHORT_TRANS'),
('f_welcome_emails', 'w_text', 'LONG_TRANS'),
('f_welcome_emails', 'w_send_time', 'INTEGER'),
('f_welcome_emails', 'w_newsletter', '?AUTO_LINK'),
('f_welcome_emails', 'w_usergroup', '?AUTO_LINK');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('f_welcome_emails', 'w_usergroup_type', 'ID_TEXT'),
('commandrchat', 'id', '*AUTO'),
('commandrchat', 'c_message', 'LONG_TEXT'),
('commandrchat', 'c_url', 'URLPATH'),
('commandrchat', 'c_incoming', 'BINARY'),
('commandrchat', 'c_timestamp', 'TIME'),
('content_reviews', 'content_type', '*ID_TEXT'),
('content_reviews', 'content_id', '*ID_TEXT'),
('content_reviews', 'review_freq', '?INTEGER'),
('content_reviews', 'next_review_time', 'TIME'),
('content_reviews', 'auto_action', 'ID_TEXT'),
('content_reviews', 'review_notification_happened', 'BINARY'),
('content_reviews', 'display_review_status', 'BINARY'),
('content_reviews', 'last_reviewed_time', 'TIME'),
('custom_comcode', 'tag_tag', '*ID_TEXT'),
('custom_comcode', 'tag_title', 'SHORT_TRANS'),
('custom_comcode', 'tag_description', 'SHORT_TRANS'),
('custom_comcode', 'tag_replace', 'LONG_TEXT'),
('custom_comcode', 'tag_example', 'LONG_TEXT'),
('custom_comcode', 'tag_parameters', 'LONG_TEXT'),
('custom_comcode', 'tag_enabled', 'BINARY'),
('custom_comcode', 'tag_dangerous_tag', 'BINARY'),
('custom_comcode', 'tag_block_tag', 'BINARY'),
('custom_comcode', 'tag_textual_tag', 'BINARY'),
('import_parts_done', 'id', '*AUTO'),
('import_parts_done', 'imp_id', 'SHORT_TEXT'),
('import_parts_done', 'imp_session', 'ID_TEXT'),
('import_session', 'imp_session', '*ID_TEXT'),
('import_session', 'imp_old_base_dir', 'SHORT_TEXT'),
('import_session', 'imp_db_host', 'ID_TEXT'),
('import_session', 'imp_db_name', 'ID_TEXT'),
('import_session', 'imp_db_user', 'ID_TEXT'),
('import_session', 'imp_db_table_prefix', 'ID_TEXT'),
('import_session', 'imp_hook', 'ID_TEXT'),
('import_session', 'imp_refresh_time', 'INTEGER'),
('import_id_remap', 'id_old', '*ID_TEXT'),
('import_id_remap', 'id_new', 'AUTO_LINK'),
('import_id_remap', 'id_type', '*ID_TEXT'),
('import_id_remap', 'id_session', '*ID_TEXT'),
('banned_ip', 'ip', '*IP');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('banned_ip', 'i_descrip', 'LONG_TEXT'),
('banned_ip', 'i_ban_until', '?TIME'),
('banned_ip', 'i_ban_positive', 'BINARY'),
('usersubmitban_member', 'the_member', '*MEMBER'),
('notification_lockdown', 'l_notification_code', '*ID_TEXT'),
('notification_lockdown', 'l_setting', 'INTEGER'),
('redirects', 'r_from_page', '*ID_TEXT'),
('redirects', 'r_from_zone', '*ID_TEXT'),
('redirects', 'r_to_page', 'ID_TEXT'),
('redirects', 'r_to_zone', 'ID_TEXT'),
('redirects', 'r_is_transparent', 'BINARY'),
('revisions', 'id', '*AUTO'),
('revisions', 'r_resource_type', 'ID_TEXT'),
('revisions', 'r_resource_id', 'ID_TEXT'),
('revisions', 'r_category_id', 'ID_TEXT'),
('revisions', 'r_original_title', 'SHORT_TEXT'),
('revisions', 'r_original_text', 'LONG_TEXT'),
('revisions', 'r_original_content_owner', 'MEMBER'),
('revisions', 'r_original_content_timestamp', 'TIME');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('revisions', 'r_original_resource_fs_path', 'LONG_TEXT'),
('revisions', 'r_original_resource_fs_record', 'LONG_TEXT'),
('revisions', 'r_actionlog_id', '?AUTO_LINK'),
('revisions', 'r_moderatorlog_id', '?AUTO_LINK'),
('hackattack', 'id', '*AUTO'),
('hackattack', 'url', 'URLPATH'),
('hackattack', 'data_post', 'LONG_TEXT'),
('hackattack', 'user_agent', 'SHORT_TEXT'),
('hackattack', 'referer', 'SHORT_TEXT'),
('hackattack', 'user_os', 'SHORT_TEXT'),
('hackattack', 'member_id', 'MEMBER'),
('hackattack', 'date_and_time', 'TIME'),
('hackattack', 'ip', 'IP'),
('hackattack', 'reason', 'ID_TEXT'),
('hackattack', 'reason_param_a', 'SHORT_TEXT'),
('hackattack', 'reason_param_b', 'SHORT_TEXT'),
('stats', 'id', '*AUTO'),
('stats', 'the_page', 'SHORT_TEXT'),
('stats', 'ip', 'IP'),
('stats', 'member_id', 'MEMBER'),
('stats', 'session_id', 'ID_TEXT'),
('stats', 'date_and_time', 'TIME'),
('stats', 'referer', 'URLPATH'),
('stats', 's_get', 'URLPATH'),
('stats', 'post', 'LONG_TEXT'),
('stats', 'browser', 'SHORT_TEXT'),
('stats', 'milliseconds', 'INTEGER'),
('stats', 'operating_system', 'SHORT_TEXT'),
('stats', 'access_denied_counter', 'INTEGER'),
('usersonline_track', 'date_and_time', '*TIME'),
('usersonline_track', 'peak', 'INTEGER'),
('ip_country', 'id', '*AUTO'),
('ip_country', 'begin_num', 'UINTEGER'),
('ip_country', 'end_num', 'UINTEGER'),
('ip_country', 'country', 'SHORT_TEXT'),
('theme_images', 'id', '*SHORT_TEXT'),
('theme_images', 'theme', '*MINIID_TEXT'),
('theme_images', 'path', 'URLPATH'),
('theme_images', 'lang', '*LANGUAGE_NAME'),
('wordfilter', 'id', '*AUTO'),
('wordfilter', 'word', 'SHORT_TEXT');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('wordfilter', 'w_replacement', 'SHORT_TEXT'),
('wordfilter', 'w_substr', 'BINARY'),
('sms_log', 'id', '*AUTO'),
('sms_log', 's_member_id', 'MEMBER'),
('sms_log', 's_time', 'TIME'),
('sms_log', 's_trigger_ip', 'IP'),
('authors', 'author', '*ID_TEXT'),
('authors', 'url', 'URLPATH'),
('authors', 'member_id', '?MEMBER'),
('authors', 'description', 'LONG_TRANS__COMCODE'),
('authors', 'skills', 'LONG_TRANS__COMCODE'),
('banners', 'name', '*ID_TEXT'),
('banners', 'expiry_date', '?TIME'),
('banners', 'submitter', 'MEMBER'),
('banners', 'img_url', 'URLPATH'),
('banners', 'the_type', 'SHORT_INTEGER'),
('banners', 'b_title_text', 'SHORT_TEXT'),
('banners', 'caption', 'SHORT_TRANS__COMCODE'),
('banners', 'b_direct_code', 'LONG_TEXT'),
('banners', 'campaign_remaining', 'INTEGER'),
('banners', 'site_url', 'URLPATH'),
('banners', 'hits_from', 'INTEGER'),
('banners', 'views_from', 'INTEGER'),
('banners', 'hits_to', 'INTEGER'),
('banners', 'views_to', 'INTEGER'),
('banners', 'importance_modulus', 'INTEGER'),
('banners', 'notes', 'LONG_TEXT'),
('banners', 'validated', 'BINARY'),
('banners', 'add_date', 'TIME'),
('banners', 'edit_date', '?TIME'),
('banners', 'b_type', 'ID_TEXT'),
('banner_types', 'id', '*ID_TEXT'),
('banner_types', 't_is_textual', 'BINARY'),
('banner_types', 't_image_width', 'INTEGER'),
('banner_types', 't_image_height', 'INTEGER'),
('banner_types', 't_max_file_size', 'INTEGER'),
('banner_types', 't_comcode_inline', 'BINARY'),
('banner_clicks', 'id', '*AUTO'),
('banner_clicks', 'c_date_and_time', 'TIME'),
('banner_clicks', 'c_member_id', 'MEMBER');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('banner_clicks', 'c_ip_address', 'IP'),
('banner_clicks', 'c_source', 'ID_TEXT'),
('banner_clicks', 'c_banner_id', 'ID_TEXT'),
('banners_types', 'name', '*ID_TEXT'),
('banners_types', 'b_type', '*ID_TEXT'),
('bookmarks', 'id', '*AUTO'),
('bookmarks', 'b_owner', 'MEMBER'),
('bookmarks', 'b_folder', 'SHORT_TEXT'),
('bookmarks', 'b_title', 'SHORT_TEXT'),
('bookmarks', 'b_page_link', 'SHORT_TEXT'),
('calendar_events', 'id', '*AUTO'),
('calendar_events', 'e_submitter', 'MEMBER'),
('calendar_events', 'e_member_calendar', '?MEMBER'),
('calendar_events', 'e_views', 'INTEGER'),
('calendar_events', 'e_title', 'SHORT_TRANS__COMCODE'),
('calendar_events', 'e_content', 'LONG_TRANS__COMCODE'),
('calendar_events', 'e_add_date', 'TIME'),
('calendar_events', 'e_edit_date', '?TIME'),
('calendar_events', 'e_recurrence', 'ID_TEXT');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('calendar_events', 'e_recurrences', '?SHORT_INTEGER'),
('calendar_events', 'e_seg_recurrences', 'BINARY'),
('calendar_events', 'e_start_year', 'INTEGER'),
('calendar_events', 'e_start_month', 'SHORT_INTEGER'),
('calendar_events', 'e_start_day', 'SHORT_INTEGER'),
('calendar_events', 'e_start_monthly_spec_type', 'ID_TEXT'),
('calendar_events', 'e_start_hour', '?SHORT_INTEGER'),
('calendar_events', 'e_start_minute', '?SHORT_INTEGER'),
('calendar_events', 'e_end_year', '?INTEGER'),
('calendar_events', 'e_end_month', '?SHORT_INTEGER'),
('calendar_events', 'e_end_day', '?SHORT_INTEGER'),
('calendar_events', 'e_end_monthly_spec_type', 'ID_TEXT'),
('calendar_events', 'e_end_hour', '?SHORT_INTEGER'),
('calendar_events', 'e_end_minute', '?SHORT_INTEGER'),
('calendar_events', 'e_timezone', 'ID_TEXT'),
('calendar_events', 'e_do_timezone_conv', 'BINARY'),
('calendar_events', 'e_priority', 'SHORT_INTEGER'),
('calendar_events', 'allow_rating', 'BINARY'),
('calendar_events', 'allow_comments', 'SHORT_INTEGER'),
('calendar_events', 'allow_trackbacks', 'BINARY'),
('calendar_events', 'notes', 'LONG_TEXT'),
('calendar_events', 'e_type', 'AUTO_LINK'),
('calendar_events', 'validated', 'BINARY'),
('calendar_types', 'id', '*AUTO'),
('calendar_types', 't_title', 'SHORT_TRANS__COMCODE'),
('calendar_types', 't_logo', 'SHORT_TEXT'),
('calendar_types', 't_external_feed', 'URLPATH'),
('calendar_reminders', 'id', '*AUTO'),
('calendar_reminders', 'e_id', 'AUTO_LINK'),
('calendar_reminders', 'n_member_id', 'MEMBER'),
('calendar_reminders', 'n_seconds_before', 'INTEGER'),
('calendar_interests', 'i_member_id', '*MEMBER'),
('calendar_interests', 't_type', '*AUTO_LINK'),
('calendar_jobs', 'id', '*AUTO'),
('calendar_jobs', 'j_time', 'TIME'),
('calendar_jobs', 'j_reminder_id', '?AUTO_LINK'),
('calendar_jobs', 'j_member_id', '?MEMBER'),
('calendar_jobs', 'j_event_id', 'AUTO_LINK'),
('catalogues', 'c_name', '*ID_TEXT'),
('catalogues', 'c_title', 'SHORT_TRANS'),
('catalogues', 'c_description', 'LONG_TRANS__COMCODE');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('catalogues', 'c_display_type', 'SHORT_INTEGER'),
('catalogues', 'c_is_tree', 'BINARY'),
('catalogues', 'c_notes', 'LONG_TEXT'),
('catalogues', 'c_add_date', 'TIME'),
('catalogues', 'c_submit_points', 'INTEGER'),
('catalogues', 'c_ecommerce', 'BINARY'),
('catalogues', 'c_default_review_freq', '?INTEGER'),
('catalogues', 'c_send_view_reports', 'ID_TEXT'),
('catalogue_categories', 'id', '*AUTO'),
('catalogue_categories', 'c_name', 'ID_TEXT'),
('catalogue_categories', 'cc_title', 'SHORT_TRANS'),
('catalogue_categories', 'cc_description', 'LONG_TRANS__COMCODE'),
('catalogue_categories', 'rep_image', 'URLPATH'),
('catalogue_categories', 'cc_notes', 'LONG_TEXT'),
('catalogue_categories', 'cc_add_date', 'TIME'),
('catalogue_categories', 'cc_parent_id', '?AUTO_LINK'),
('catalogue_categories', 'cc_move_target', '?AUTO_LINK'),
('catalogue_categories', 'cc_move_days_lower', 'INTEGER'),
('catalogue_categories', 'cc_move_days_higher', 'INTEGER'),
('catalogue_categories', 'cc_order', 'INTEGER'),
('catalogue_fields', 'id', '*AUTO'),
('catalogue_fields', 'c_name', 'ID_TEXT'),
('catalogue_fields', 'cf_name', 'SHORT_TRANS'),
('catalogue_fields', 'cf_description', 'LONG_TRANS'),
('catalogue_fields', 'cf_type', 'ID_TEXT'),
('catalogue_fields', 'cf_order', 'INTEGER'),
('catalogue_fields', 'cf_defines_order', 'SHORT_INTEGER'),
('catalogue_fields', 'cf_visible', 'BINARY'),
('catalogue_fields', 'cf_searchable', 'BINARY'),
('catalogue_fields', 'cf_default', 'LONG_TEXT'),
('catalogue_fields', 'cf_required', 'BINARY'),
('catalogue_fields', 'cf_put_in_category', 'BINARY'),
('catalogue_fields', 'cf_put_in_search', 'BINARY'),
('catalogue_fields', 'cf_options', 'SHORT_TEXT'),
('catalogue_entries', 'id', '*AUTO'),
('catalogue_entries', 'c_name', 'ID_TEXT'),
('catalogue_entries', 'cc_id', 'AUTO_LINK'),
('catalogue_entries', 'ce_submitter', 'MEMBER'),
('catalogue_entries', 'ce_add_date', 'TIME'),
('catalogue_entries', 'ce_edit_date', '?TIME');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('catalogue_entries', 'ce_views', 'INTEGER'),
('catalogue_entries', 'ce_views_prior', 'INTEGER'),
('catalogue_entries', 'ce_validated', 'BINARY'),
('catalogue_entries', 'notes', 'LONG_TEXT'),
('catalogue_entries', 'allow_rating', 'BINARY'),
('catalogue_entries', 'allow_comments', 'SHORT_INTEGER'),
('catalogue_entries', 'allow_trackbacks', 'BINARY'),
('catalogue_entries', 'ce_last_moved', 'INTEGER'),
('catalogue_efv_long_trans', 'id', '*AUTO'),
('catalogue_efv_long_trans', 'cf_id', 'AUTO_LINK'),
('catalogue_efv_long_trans', 'ce_id', 'AUTO_LINK'),
('catalogue_efv_long_trans', 'cv_value', 'LONG_TRANS__COMCODE'),
('catalogue_efv_long', 'id', '*AUTO'),
('catalogue_efv_long', 'cf_id', 'AUTO_LINK'),
('catalogue_efv_long', 'ce_id', 'AUTO_LINK'),
('catalogue_efv_long', 'cv_value', 'LONG_TEXT'),
('catalogue_efv_short_trans', 'id', '*AUTO'),
('catalogue_efv_short_trans', 'cf_id', 'AUTO_LINK'),
('catalogue_efv_short_trans', 'ce_id', 'AUTO_LINK');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('catalogue_efv_short_trans', 'cv_value', 'SHORT_TRANS__COMCODE'),
('catalogue_efv_short', 'id', '*AUTO'),
('catalogue_efv_short', 'cf_id', 'AUTO_LINK'),
('catalogue_efv_short', 'ce_id', 'AUTO_LINK'),
('catalogue_efv_short', 'cv_value', 'SHORT_TEXT'),
('catalogue_entry_linkage', 'catalogue_entry_id', '*AUTO_LINK'),
('catalogue_entry_linkage', 'content_type', 'ID_TEXT'),
('catalogue_entry_linkage', 'content_id', 'ID_TEXT'),
('catalogue_cat_treecache', 'cc_id', '*AUTO_LINK'),
('catalogue_cat_treecache', 'cc_ancestor_id', '*AUTO_LINK'),
('catalogue_childcountcache', 'cc_id', '*AUTO_LINK'),
('catalogue_childcountcache', 'c_num_rec_children', 'INTEGER'),
('catalogue_childcountcache', 'c_num_rec_entries', 'INTEGER'),
('catalogue_efv_float', 'id', '*AUTO'),
('catalogue_efv_float', 'cf_id', 'AUTO_LINK'),
('catalogue_efv_float', 'ce_id', 'AUTO_LINK'),
('catalogue_efv_float', 'cv_value', '?REAL'),
('catalogue_efv_integer', 'id', '*AUTO'),
('catalogue_efv_integer', 'cf_id', 'AUTO_LINK'),
('catalogue_efv_integer', 'ce_id', 'AUTO_LINK'),
('catalogue_efv_integer', 'cv_value', '?INTEGER'),
('chat_rooms', 'id', '*AUTO'),
('chat_rooms', 'room_name', 'SHORT_TEXT'),
('chat_rooms', 'room_owner', '?INTEGER'),
('chat_rooms', 'allow_list', 'LONG_TEXT'),
('chat_rooms', 'allow_list_groups', 'LONG_TEXT'),
('chat_rooms', 'disallow_list', 'LONG_TEXT'),
('chat_rooms', 'disallow_list_groups', 'LONG_TEXT'),
('chat_rooms', 'room_language', 'LANGUAGE_NAME'),
('chat_rooms', 'c_welcome', 'LONG_TRANS'),
('chat_rooms', 'is_im', 'BINARY'),
('chat_messages', 'id', '*AUTO'),
('chat_messages', 'system_message', 'BINARY'),
('chat_messages', 'ip_address', 'IP'),
('chat_messages', 'room_id', 'AUTO_LINK'),
('chat_messages', 'member_id', 'MEMBER'),
('chat_messages', 'date_and_time', 'TIME'),
('chat_messages', 'the_message', 'LONG_TRANS__COMCODE'),
('chat_messages', 'text_colour', 'SHORT_TEXT'),
('chat_messages', 'font_name', 'SHORT_TEXT'),
('f_member_custom_fields', 'field_10', '?INTEGER');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('chat_blocking', 'member_blocker', '*MEMBER'),
('chat_blocking', 'member_blocked', '*MEMBER'),
('chat_blocking', 'date_and_time', 'TIME'),
('chat_friends', 'member_likes', '*MEMBER'),
('chat_friends', 'member_liked', '*MEMBER'),
('chat_friends', 'date_and_time', 'TIME'),
('chat_events', 'id', '*AUTO'),
('chat_events', 'e_type_code', 'ID_TEXT'),
('chat_events', 'e_member_id', 'MEMBER'),
('chat_events', 'e_room_id', '?AUTO_LINK'),
('chat_events', 'e_date_and_time', 'TIME'),
('chat_active', 'id', '*AUTO'),
('chat_active', 'member_id', 'MEMBER'),
('chat_active', 'room_id', '?AUTO_LINK'),
('chat_active', 'date_and_time', 'TIME'),
('chat_sound_effects', 's_member', '*MEMBER'),
('chat_sound_effects', 's_effect_id', '*ID_TEXT'),
('chat_sound_effects', 's_url', 'URLPATH'),
('download_categories', 'id', '*AUTO'),
('download_categories', 'category', 'SHORT_TRANS'),
('download_categories', 'parent_id', '?AUTO_LINK'),
('download_categories', 'add_date', 'TIME'),
('download_categories', 'notes', 'LONG_TEXT'),
('download_categories', 'description', 'LONG_TRANS__COMCODE'),
('download_categories', 'rep_image', 'URLPATH'),
('download_downloads', 'id', '*AUTO'),
('download_downloads', 'category_id', 'AUTO_LINK'),
('download_downloads', 'name', 'SHORT_TRANS'),
('download_downloads', 'url', 'URLPATH'),
('download_downloads', 'description', 'LONG_TRANS__COMCODE'),
('download_downloads', 'author', 'ID_TEXT'),
('download_downloads', 'additional_details', 'LONG_TRANS__COMCODE'),
('download_downloads', 'num_downloads', 'INTEGER'),
('download_downloads', 'out_mode_id', '?AUTO_LINK'),
('download_downloads', 'add_date', 'TIME'),
('download_downloads', 'edit_date', '?TIME'),
('download_downloads', 'validated', 'BINARY'),
('download_downloads', 'default_pic', 'INTEGER'),
('download_downloads', 'file_size', '?INTEGER'),
('download_downloads', 'allow_rating', 'BINARY');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('download_downloads', 'allow_comments', 'SHORT_INTEGER'),
('download_downloads', 'allow_trackbacks', 'BINARY'),
('download_downloads', 'notes', 'LONG_TEXT'),
('download_downloads', 'download_views', 'INTEGER'),
('download_downloads', 'download_cost', 'INTEGER'),
('download_downloads', 'download_submitter_gets_points', 'BINARY'),
('download_downloads', 'submitter', 'MEMBER'),
('download_downloads', 'original_filename', 'SHORT_TEXT'),
('download_downloads', 'rep_image', 'URLPATH'),
('download_downloads', 'download_licence', '?AUTO_LINK'),
('download_downloads', 'download_data_mash', 'LONG_TEXT'),
('download_downloads', 'url_redirect', 'URLPATH'),
('download_logging', 'id', '*AUTO_LINK'),
('download_logging', 'member_id', '*MEMBER'),
('download_logging', 'ip', 'IP'),
('download_logging', 'date_and_time', 'TIME'),
('download_licences', 'id', '*AUTO'),
('download_licences', 'l_title', 'SHORT_TEXT'),
('download_licences', 'l_text', 'LONG_TEXT');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('galleries', 'name', '*ID_TEXT'),
('galleries', 'description', 'LONG_TRANS__COMCODE'),
('galleries', 'fullname', 'SHORT_TRANS__COMCODE'),
('galleries', 'add_date', 'TIME'),
('galleries', 'rep_image', 'URLPATH'),
('galleries', 'parent_id', 'ID_TEXT'),
('galleries', 'watermark_top_left', 'URLPATH'),
('galleries', 'watermark_top_right', 'URLPATH'),
('galleries', 'watermark_bottom_left', 'URLPATH'),
('galleries', 'watermark_bottom_right', 'URLPATH'),
('galleries', 'accept_images', 'BINARY'),
('galleries', 'accept_videos', 'BINARY'),
('galleries', 'allow_rating', 'BINARY'),
('galleries', 'allow_comments', 'SHORT_INTEGER'),
('galleries', 'notes', 'LONG_TEXT'),
('galleries', 'is_member_synched', 'BINARY'),
('galleries', 'flow_mode_interface', 'BINARY'),
('galleries', 'gallery_views', 'INTEGER'),
('galleries', 'g_owner', '?MEMBER'),
('images', 'id', '*AUTO'),
('images', 'cat', 'ID_TEXT'),
('images', 'url', 'URLPATH'),
('images', 'thumb_url', 'URLPATH'),
('images', 'description', 'LONG_TRANS__COMCODE'),
('images', 'allow_rating', 'BINARY'),
('images', 'allow_comments', 'SHORT_INTEGER'),
('images', 'allow_trackbacks', 'BINARY'),
('images', 'notes', 'LONG_TEXT'),
('images', 'submitter', 'MEMBER'),
('images', 'validated', 'BINARY'),
('images', 'add_date', 'TIME'),
('images', 'edit_date', '?TIME'),
('images', 'image_views', 'INTEGER'),
('images', 'title', 'SHORT_TRANS'),
('videos', 'id', '*AUTO'),
('videos', 'cat', 'ID_TEXT'),
('videos', 'url', 'URLPATH'),
('videos', 'thumb_url', 'URLPATH'),
('videos', 'description', 'LONG_TRANS__COMCODE'),
('videos', 'allow_rating', 'BINARY'),
('videos', 'allow_comments', 'SHORT_INTEGER');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('videos', 'allow_trackbacks', 'BINARY'),
('videos', 'notes', 'LONG_TEXT'),
('videos', 'submitter', 'MEMBER'),
('videos', 'validated', 'BINARY'),
('videos', 'add_date', 'TIME'),
('videos', 'edit_date', '?TIME'),
('videos', 'video_views', 'INTEGER'),
('videos', 'video_width', 'INTEGER'),
('videos', 'video_height', 'INTEGER'),
('videos', 'video_length', 'INTEGER'),
('videos', 'title', 'SHORT_TRANS'),
('video_transcoding', 't_id', '*ID_TEXT'),
('video_transcoding', 't_local_id', '?AUTO_LINK'),
('video_transcoding', 't_local_id_field', 'ID_TEXT'),
('video_transcoding', 't_error', 'LONG_TEXT'),
('video_transcoding', 't_url', 'URLPATH'),
('video_transcoding', 't_table', 'ID_TEXT'),
('video_transcoding', 't_url_field', 'ID_TEXT'),
('video_transcoding', 't_orig_filename_field', 'ID_TEXT'),
('video_transcoding', 't_width_field', 'ID_TEXT'),
('video_transcoding', 't_height_field', 'ID_TEXT'),
('video_transcoding', 't_output_filename', 'ID_TEXT'),
('invoices', 'id', '*AUTO'),
('invoices', 'i_type_code', 'ID_TEXT'),
('invoices', 'i_member_id', 'MEMBER'),
('invoices', 'i_state', 'ID_TEXT'),
('invoices', 'i_amount', 'SHORT_TEXT'),
('invoices', 'i_special', 'SHORT_TEXT'),
('invoices', 'i_time', 'TIME'),
('invoices', 'i_note', 'LONG_TEXT'),
('news', 'id', '*AUTO'),
('news', 'date_and_time', 'TIME'),
('news', 'title', 'SHORT_TRANS__COMCODE'),
('news', 'news', 'LONG_TRANS__COMCODE'),
('news', 'news_article', 'LONG_TRANS__COMCODE'),
('news', 'allow_rating', 'BINARY'),
('news', 'allow_comments', 'SHORT_INTEGER'),
('news', 'allow_trackbacks', 'BINARY'),
('news', 'notes', 'LONG_TEXT'),
('news', 'author', 'ID_TEXT');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('news', 'submitter', 'MEMBER'),
('news', 'validated', 'BINARY'),
('news', 'edit_date', '?TIME'),
('news', 'news_category', 'AUTO_LINK'),
('news', 'news_views', 'INTEGER'),
('news', 'news_image', 'URLPATH'),
('news_categories', 'id', '*AUTO'),
('news_categories', 'nc_title', 'SHORT_TRANS'),
('news_categories', 'nc_owner', '?MEMBER'),
('news_categories', 'nc_img', 'URLPATH'),
('news_categories', 'notes', 'LONG_TEXT'),
('news_rss_cloud', 'id', '*AUTO'),
('news_rss_cloud', 'rem_procedure', 'ID_TEXT'),
('news_rss_cloud', 'rem_port', 'INTEGER'),
('news_rss_cloud', 'rem_path', 'SHORT_TEXT'),
('news_rss_cloud', 'rem_protocol', 'ID_TEXT'),
('news_rss_cloud', 'rem_ip', 'IP'),
('news_rss_cloud', 'watching_channel', 'URLPATH'),
('news_rss_cloud', 'register_time', 'TIME');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('news_category_entries', 'news_entry', '*AUTO_LINK'),
('news_category_entries', 'news_entry_category', '*AUTO_LINK'),
('newsletter_subscribers', 'id', '*AUTO'),
('newsletter_subscribers', 'email', 'SHORT_TEXT'),
('newsletter_subscribers', 'join_time', 'TIME'),
('newsletter_subscribers', 'code_confirm', 'INTEGER'),
('newsletter_subscribers', 'the_password', 'SHORT_TEXT'),
('newsletter_subscribers', 'pass_salt', 'ID_TEXT'),
('newsletter_subscribers', 'language', 'ID_TEXT'),
('newsletter_subscribers', 'n_forename', 'SHORT_TEXT'),
('newsletter_subscribers', 'n_surname', 'SHORT_TEXT'),
('newsletter_archive', 'id', '*AUTO'),
('newsletter_archive', 'date_and_time', 'INTEGER'),
('newsletter_archive', 'subject', 'SHORT_TEXT'),
('newsletter_archive', 'newsletter', 'LONG_TEXT'),
('newsletter_archive', 'language', 'ID_TEXT'),
('newsletter_archive', 'importance_level', 'INTEGER'),
('newsletters', 'id', '*AUTO'),
('newsletters', 'title', 'SHORT_TRANS'),
('newsletters', 'description', 'LONG_TRANS'),
('newsletter_subscribe', 'newsletter_id', '*AUTO_LINK'),
('newsletter_subscribe', 'the_level', 'SHORT_INTEGER'),
('newsletter_subscribe', 'email', '*SHORT_TEXT'),
('newsletter_drip_send', 'id', '*AUTO'),
('newsletter_drip_send', 'd_inject_time', 'TIME'),
('newsletter_drip_send', 'd_subject', 'SHORT_TEXT'),
('newsletter_drip_send', 'd_message', 'LONG_TEXT'),
('newsletter_drip_send', 'd_html_only', 'BINARY'),
('newsletter_drip_send', 'd_to_email', 'SHORT_TEXT'),
('newsletter_drip_send', 'd_to_name', 'SHORT_TEXT'),
('newsletter_drip_send', 'd_from_email', 'SHORT_TEXT'),
('newsletter_drip_send', 'd_from_name', 'SHORT_TEXT'),
('newsletter_drip_send', 'd_priority', 'SHORT_INTEGER'),
('newsletter_drip_send', 'd_template', 'ID_TEXT'),
('newsletter_periodic', 'id', '*AUTO'),
('newsletter_periodic', 'np_message', 'LONG_TEXT'),
('newsletter_periodic', 'np_subject', 'LONG_TEXT'),
('newsletter_periodic', 'np_lang', 'LANGUAGE_NAME'),
('newsletter_periodic', 'np_send_details', 'LONG_TEXT'),
('newsletter_periodic', 'np_html_only', 'BINARY'),
('newsletter_periodic', 'np_from_email', 'SHORT_TEXT');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('newsletter_periodic', 'np_from_name', 'SHORT_TEXT'),
('newsletter_periodic', 'np_priority', 'SHORT_INTEGER'),
('newsletter_periodic', 'np_csv_data', 'LONG_TEXT'),
('newsletter_periodic', 'np_frequency', 'SHORT_TEXT'),
('newsletter_periodic', 'np_day', 'SHORT_INTEGER'),
('newsletter_periodic', 'np_in_full', 'BINARY'),
('newsletter_periodic', 'np_template', 'ID_TEXT'),
('newsletter_periodic', 'np_last_sent', 'TIME'),
('chargelog', 'id', '*AUTO'),
('chargelog', 'member_id', 'MEMBER'),
('chargelog', 'amount', 'INTEGER'),
('chargelog', 'reason', 'SHORT_TRANS__COMCODE'),
('chargelog', 'date_and_time', 'TIME'),
('gifts', 'id', '*AUTO'),
('gifts', 'date_and_time', 'TIME'),
('gifts', 'amount', 'INTEGER'),
('gifts', 'gift_from', 'MEMBER'),
('gifts', 'gift_to', 'MEMBER'),
('gifts', 'reason', 'SHORT_TRANS__COMCODE'),
('gifts', 'anonymous', 'BINARY'),
('f_member_custom_fields', 'field_11', '?INTEGER'),
('f_member_custom_fields', 'field_12', '?INTEGER'),
('f_member_custom_fields', 'field_13', '?INTEGER'),
('f_member_custom_fields', 'field_14', '?INTEGER'),
('f_member_custom_fields', 'field_15', '?INTEGER'),
('prices', 'name', '*ID_TEXT'),
('prices', 'price', 'INTEGER'),
('sales', 'id', '*AUTO'),
('sales', 'date_and_time', 'TIME'),
('sales', 'memberid', 'MEMBER'),
('sales', 'purchasetype', 'ID_TEXT'),
('sales', 'details', 'SHORT_TEXT'),
('sales', 'details2', 'SHORT_TEXT'),
('pstore_customs', 'id', '*AUTO'),
('pstore_customs', 'c_title', 'SHORT_TRANS'),
('pstore_customs', 'c_description', 'LONG_TRANS__COMCODE'),
('pstore_customs', 'c_mail_subject', 'SHORT_TRANS'),
('pstore_customs', 'c_mail_body', 'LONG_TRANS'),
('pstore_customs', 'c_enabled', 'BINARY'),
('pstore_customs', 'c_cost', 'INTEGER');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('pstore_customs', 'c_one_per_member', 'BINARY'),
('pstore_permissions', 'id', '*AUTO'),
('pstore_permissions', 'p_title', 'SHORT_TRANS'),
('pstore_permissions', 'p_description', 'LONG_TRANS__COMCODE'),
('pstore_permissions', 'p_mail_subject', 'SHORT_TRANS'),
('pstore_permissions', 'p_mail_body', 'LONG_TRANS'),
('pstore_permissions', 'p_enabled', 'BINARY'),
('pstore_permissions', 'p_cost', 'INTEGER'),
('pstore_permissions', 'p_hours', '?INTEGER'),
('pstore_permissions', 'p_type', 'ID_TEXT'),
('pstore_permissions', 'p_privilege', 'ID_TEXT'),
('pstore_permissions', 'p_zone', 'ID_TEXT'),
('pstore_permissions', 'p_page', 'ID_TEXT'),
('pstore_permissions', 'p_module', 'ID_TEXT'),
('pstore_permissions', 'p_category', 'ID_TEXT'),
('poll', 'id', '*AUTO'),
('poll', 'question', 'SHORT_TRANS__COMCODE'),
('poll', 'option1', 'SHORT_TRANS__COMCODE'),
('poll', 'option2', 'SHORT_TRANS__COMCODE');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('poll', 'option3', '?SHORT_TRANS__COMCODE'),
('poll', 'option4', '?SHORT_TRANS__COMCODE'),
('poll', 'option5', '?SHORT_TRANS__COMCODE'),
('poll', 'option6', '?SHORT_TRANS__COMCODE'),
('poll', 'option7', '?SHORT_TRANS__COMCODE'),
('poll', 'option8', '?SHORT_TRANS__COMCODE'),
('poll', 'option9', '?SHORT_TRANS__COMCODE'),
('poll', 'option10', '?SHORT_TRANS__COMCODE'),
('poll', 'votes1', 'INTEGER'),
('poll', 'votes2', 'INTEGER'),
('poll', 'votes3', 'INTEGER'),
('poll', 'votes4', 'INTEGER'),
('poll', 'votes5', 'INTEGER'),
('poll', 'votes6', 'INTEGER'),
('poll', 'votes7', 'INTEGER'),
('poll', 'votes8', 'INTEGER'),
('poll', 'votes9', 'INTEGER'),
('poll', 'votes10', 'INTEGER'),
('poll', 'allow_rating', 'BINARY'),
('poll', 'allow_comments', 'SHORT_INTEGER'),
('poll', 'allow_trackbacks', 'BINARY'),
('poll', 'notes', 'LONG_TEXT'),
('poll', 'num_options', 'SHORT_INTEGER'),
('poll', 'is_current', 'BINARY'),
('poll', 'date_and_time', '?TIME'),
('poll', 'submitter', 'MEMBER'),
('poll', 'add_time', 'INTEGER'),
('poll', 'poll_views', 'INTEGER'),
('poll', 'edit_date', '?TIME'),
('f_member_custom_fields', 'field_16', '?INTEGER'),
('poll_votes', 'id', '*AUTO'),
('poll_votes', 'v_poll_id', 'AUTO_LINK'),
('poll_votes', 'v_voter_id', '?MEMBER'),
('poll_votes', 'v_voter_ip', 'IP'),
('poll_votes', 'v_vote_for', '?SHORT_INTEGER'),
('trans_expecting', 'id', '*ID_TEXT'),
('trans_expecting', 'e_purchase_id', 'ID_TEXT'),
('trans_expecting', 'e_item_name', 'SHORT_TEXT'),
('trans_expecting', 'e_member_id', 'MEMBER'),
('trans_expecting', 'e_amount', 'SHORT_TEXT'),
('trans_expecting', 'e_currency', 'ID_TEXT');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('trans_expecting', 'e_ip_address', 'IP'),
('trans_expecting', 'e_session_id', 'ID_TEXT'),
('trans_expecting', 'e_time', 'TIME'),
('trans_expecting', 'e_length', '?INTEGER'),
('trans_expecting', 'e_length_units', 'ID_TEXT'),
('f_member_custom_fields', 'field_17', 'LONG_TEXT'),
('f_member_custom_fields', 'field_18', 'LONG_TEXT'),
('f_member_custom_fields', 'field_19', 'LONG_TEXT'),
('f_member_custom_fields', 'field_20', '?INTEGER'),
('f_member_custom_fields', 'field_21', 'LONG_TEXT'),
('f_member_custom_fields', 'field_22', 'LONG_TEXT'),
('f_member_custom_fields', 'field_23', 'LONG_TEXT'),
('f_member_custom_fields', 'field_24', 'LONG_TEXT'),
('transactions', 'id', '*ID_TEXT'),
('transactions', 't_type_code', 'ID_TEXT'),
('transactions', 't_purchase_id', 'ID_TEXT'),
('transactions', 't_status', 'SHORT_TEXT'),
('transactions', 't_reason', 'SHORT_TEXT'),
('transactions', 't_amount', 'SHORT_TEXT'),
('transactions', 't_currency', 'ID_TEXT'),
('transactions', 't_parent_txn_id', 'ID_TEXT'),
('transactions', 't_time', '*TIME'),
('transactions', 't_pending_reason', 'SHORT_TEXT'),
('transactions', 't_memo', 'LONG_TEXT'),
('transactions', 't_via', 'ID_TEXT'),
('quiz_member_last_visit', 'id', '*AUTO'),
('quiz_member_last_visit', 'v_time', 'TIME'),
('quiz_member_last_visit', 'v_member_id', 'MEMBER'),
('quiz_member_last_visit', 'v_quiz_id', 'AUTO_LINK'),
('quizzes', 'id', '*AUTO'),
('quizzes', 'q_timeout', '?INTEGER'),
('quizzes', 'q_name', 'SHORT_TRANS'),
('quizzes', 'q_start_text', 'LONG_TRANS__COMCODE'),
('quizzes', 'q_end_text', 'LONG_TRANS__COMCODE'),
('quizzes', 'q_notes', 'LONG_TEXT'),
('quizzes', 'q_percentage', 'INTEGER'),
('quizzes', 'q_open_time', 'TIME'),
('quizzes', 'q_close_time', '?TIME'),
('quizzes', 'q_num_winners', 'INTEGER'),
('quizzes', 'q_redo_time', '?INTEGER');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('quizzes', 'q_type', 'ID_TEXT'),
('quizzes', 'q_add_date', 'TIME'),
('quizzes', 'q_validated', 'BINARY'),
('quizzes', 'q_submitter', 'MEMBER'),
('quizzes', 'q_points_for_passing', 'INTEGER'),
('quizzes', 'q_tied_newsletter', '?AUTO_LINK'),
('quizzes', 'q_end_text_fail', 'LONG_TRANS__COMCODE'),
('quizzes', 'q_reveal_answers', 'BINARY'),
('quizzes', 'q_shuffle_questions', 'BINARY'),
('quizzes', 'q_shuffle_answers', 'BINARY'),
('quiz_questions', 'id', '*AUTO'),
('quiz_questions', 'q_type', 'ID_TEXT'),
('quiz_questions', 'q_quiz', 'AUTO_LINK'),
('quiz_questions', 'q_question_text', 'LONG_TRANS__COMCODE'),
('quiz_questions', 'q_question_extra_text', 'LONG_TRANS__COMCODE'),
('quiz_questions', 'q_order', 'INTEGER'),
('quiz_questions', 'q_required', 'BINARY'),
('quiz_questions', 'q_marked', 'BINARY'),
('quiz_question_answers', 'id', '*AUTO');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('quiz_question_answers', 'q_question', 'AUTO_LINK'),
('quiz_question_answers', 'q_answer_text', 'SHORT_TRANS__COMCODE'),
('quiz_question_answers', 'q_is_correct', 'BINARY'),
('quiz_question_answers', 'q_order', 'INTEGER'),
('quiz_question_answers', 'q_explanation', 'LONG_TRANS'),
('quiz_winner', 'q_quiz', '*AUTO_LINK'),
('quiz_winner', 'q_entry', '*AUTO_LINK'),
('quiz_winner', 'q_winner_level', 'INTEGER'),
('quiz_entries', 'id', '*AUTO'),
('quiz_entries', 'q_time', 'TIME'),
('quiz_entries', 'q_member', 'MEMBER'),
('quiz_entries', 'q_quiz', 'AUTO_LINK'),
('quiz_entries', 'q_results', 'INTEGER'),
('quiz_entry_answer', 'id', '*AUTO'),
('quiz_entry_answer', 'q_entry', 'AUTO_LINK'),
('quiz_entry_answer', 'q_question', 'AUTO_LINK'),
('quiz_entry_answer', 'q_answer', 'LONG_TEXT'),
('searches_saved', 'id', '*AUTO'),
('searches_saved', 's_title', 'SHORT_TEXT'),
('searches_saved', 's_member_id', 'MEMBER'),
('searches_saved', 's_time', 'TIME'),
('searches_saved', 's_primary', 'SHORT_TEXT'),
('searches_saved', 's_auxillary', 'LONG_TEXT'),
('searches_logged', 'id', '*AUTO'),
('searches_logged', 's_member_id', 'MEMBER'),
('searches_logged', 's_time', 'TIME'),
('searches_logged', 's_primary', 'SHORT_TEXT'),
('searches_logged', 's_auxillary', 'LONG_TEXT'),
('searches_logged', 's_num_results', 'INTEGER'),
('shopping_cart', 'id', '*AUTO'),
('shopping_cart', 'session_id', 'ID_TEXT'),
('shopping_cart', 'ordered_by', 'MEMBER'),
('shopping_cart', 'product_id', 'AUTO_LINK'),
('shopping_cart', 'product_name', 'SHORT_TEXT'),
('shopping_cart', 'product_code', 'SHORT_TEXT'),
('shopping_cart', 'quantity', 'INTEGER'),
('shopping_cart', 'price_pre_tax', 'REAL'),
('shopping_cart', 'price', 'REAL'),
('shopping_cart', 'product_description', 'LONG_TEXT'),
('shopping_cart', 'product_type', 'SHORT_TEXT'),
('shopping_cart', 'product_weight', 'REAL');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('shopping_cart', 'is_deleted', 'BINARY'),
('shopping_order', 'id', '*AUTO'),
('shopping_order', 'c_member', 'INTEGER'),
('shopping_order', 'session_id', 'ID_TEXT'),
('shopping_order', 'add_date', 'TIME'),
('shopping_order', 'tot_price', 'REAL'),
('shopping_order', 'order_status', 'ID_TEXT'),
('shopping_order', 'notes', 'LONG_TEXT'),
('shopping_order', 'transaction_id', 'SHORT_TEXT'),
('shopping_order', 'purchase_through', 'SHORT_TEXT'),
('shopping_order', 'tax_opted_out', 'BINARY'),
('shopping_order_details', 'id', '*AUTO'),
('shopping_order_details', 'order_id', '?AUTO_LINK'),
('shopping_order_details', 'p_id', '?AUTO_LINK'),
('shopping_order_details', 'p_name', 'SHORT_TEXT'),
('shopping_order_details', 'p_code', 'SHORT_TEXT'),
('shopping_order_details', 'p_type', 'SHORT_TEXT'),
('shopping_order_details', 'p_quantity', 'INTEGER'),
('shopping_order_details', 'p_price', 'REAL'),
('shopping_order_details', 'included_tax', 'REAL'),
('shopping_order_details', 'dispatch_status', 'SHORT_TEXT'),
('shopping_logging', 'id', '*AUTO'),
('shopping_logging', 'e_member_id', '*MEMBER'),
('shopping_logging', 'session_id', 'ID_TEXT'),
('shopping_logging', 'ip', 'IP'),
('shopping_logging', 'last_action', 'SHORT_TEXT'),
('shopping_logging', 'date_and_time', 'TIME'),
('shopping_order_addresses', 'id', '*AUTO'),
('shopping_order_addresses', 'order_id', '?AUTO_LINK'),
('shopping_order_addresses', 'address_name', 'SHORT_TEXT'),
('shopping_order_addresses', 'address_street', 'LONG_TEXT'),
('shopping_order_addresses', 'address_city', 'SHORT_TEXT'),
('shopping_order_addresses', 'address_state', 'SHORT_TEXT'),
('shopping_order_addresses', 'address_zip', 'SHORT_TEXT'),
('shopping_order_addresses', 'address_country', 'SHORT_TEXT'),
('shopping_order_addresses', 'receiver_email', 'SHORT_TEXT'),
('shopping_order_addresses', 'contact_phone', 'SHORT_TEXT'),
('shopping_order_addresses', 'first_name', 'SHORT_TEXT'),
('shopping_order_addresses', 'last_name', 'SHORT_TEXT'),
('f_member_custom_fields', 'field_25', 'SHORT_TEXT');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('f_member_custom_fields', 'field_26', 'SHORT_TEXT'),
('subscriptions', 'id', '*AUTO'),
('subscriptions', 's_type_code', 'ID_TEXT'),
('subscriptions', 's_member_id', 'MEMBER'),
('subscriptions', 's_state', 'ID_TEXT'),
('subscriptions', 's_amount', 'SHORT_TEXT'),
('subscriptions', 's_purchase_id', 'ID_TEXT'),
('subscriptions', 's_time', 'TIME'),
('subscriptions', 's_auto_fund_source', 'ID_TEXT'),
('subscriptions', 's_auto_fund_key', 'SHORT_TEXT'),
('subscriptions', 's_via', 'ID_TEXT'),
('subscriptions', 's_length', 'INTEGER'),
('subscriptions', 's_length_units', 'SHORT_TEXT'),
('f_usergroup_subs', 'id', '*AUTO'),
('f_usergroup_subs', 's_title', 'SHORT_TRANS'),
('f_usergroup_subs', 's_description', 'LONG_TRANS__COMCODE'),
('f_usergroup_subs', 's_cost', 'SHORT_TEXT'),
('f_usergroup_subs', 's_length', 'INTEGER'),
('f_usergroup_subs', 's_length_units', 'SHORT_TEXT');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('f_usergroup_subs', 's_auto_recur', 'BINARY'),
('f_usergroup_subs', 's_group_id', 'GROUP'),
('f_usergroup_subs', 's_enabled', 'BINARY'),
('f_usergroup_subs', 's_mail_start', 'LONG_TRANS'),
('f_usergroup_subs', 's_mail_end', 'LONG_TRANS'),
('f_usergroup_subs', 's_mail_uhoh', 'LONG_TRANS'),
('f_usergroup_subs', 's_uses_primary', 'BINARY'),
('f_usergroup_sub_mails', 'id', '*AUTO'),
('f_usergroup_sub_mails', 'm_usergroup_sub_id', 'AUTO_LINK'),
('f_usergroup_sub_mails', 'm_ref_point', 'ID_TEXT'),
('f_usergroup_sub_mails', 'm_ref_point_offset', 'INTEGER'),
('f_usergroup_sub_mails', 'm_subject', 'SHORT_TRANS'),
('f_usergroup_sub_mails', 'm_body', 'LONG_TRANS'),
('ticket_known_emailers', 'email_address', '*SHORT_TEXT'),
('ticket_known_emailers', 'member_id', 'MEMBER'),
('ticket_extra_access', 'ticket_id', '*SHORT_TEXT'),
('ticket_extra_access', 'member_id', '*MEMBER'),
('tickets', 'ticket_id', '*SHORT_TEXT'),
('tickets', 'topic_id', 'AUTO_LINK'),
('tickets', 'forum_id', 'AUTO_LINK'),
('tickets', 'ticket_type', 'AUTO_LINK'),
('ticket_types', 'id', '*AUTO'),
('ticket_types', 'ticket_type_name', 'SHORT_TRANS'),
('ticket_types', 'guest_emails_mandatory', 'BINARY'),
('ticket_types', 'search_faq', 'BINARY'),
('ticket_types', 'cache_lead_time', '?TIME'),
('wiki_children', 'parent_id', '*AUTO_LINK'),
('wiki_children', 'child_id', '*AUTO_LINK'),
('wiki_children', 'the_order', 'INTEGER'),
('wiki_children', 'title', 'SHORT_TEXT'),
('wiki_pages', 'id', '*AUTO'),
('wiki_pages', 'title', 'SHORT_TRANS'),
('wiki_pages', 'notes', 'LONG_TEXT'),
('wiki_pages', 'description', 'LONG_TRANS__COMCODE'),
('wiki_pages', 'add_date', 'TIME'),
('wiki_pages', 'edit_date', '?TIME'),
('wiki_pages', 'wiki_views', 'INTEGER'),
('wiki_pages', 'hide_posts', 'BINARY'),
('wiki_pages', 'submitter', 'MEMBER'),
('wiki_posts', 'id', '*AUTO'),
('wiki_posts', 'page_id', 'AUTO_LINK');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('wiki_posts', 'the_message', 'LONG_TRANS__COMCODE'),
('wiki_posts', 'date_and_time', 'TIME'),
('wiki_posts', 'validated', 'BINARY'),
('wiki_posts', 'wiki_views', 'INTEGER'),
('wiki_posts', 'member_id', 'MEMBER'),
('wiki_posts', 'edit_date', '?TIME'),
('f_member_custom_fields', 'field_27', '?INTEGER'),
('filedump', 'id', '*AUTO'),
('filedump', 'name', 'ID_TEXT'),
('filedump', 'path', 'URLPATH'),
('filedump', 'description', 'SHORT_TRANS'),
('filedump', 'the_member', 'MEMBER'),
('staff_website_monitoring', 'id', '*AUTO'),
('staff_website_monitoring', 'site_url', 'URLPATH'),
('staff_website_monitoring', 'site_name', 'SHORT_TEXT'),
('staff_checklist_cus_tasks', 'id', '*AUTO'),
('staff_checklist_cus_tasks', 'task_title', 'LONG_TEXT'),
('staff_checklist_cus_tasks', 'add_date', 'TIME'),
('staff_checklist_cus_tasks', 'recur_interval', 'INTEGER'),
('staff_checklist_cus_tasks', 'recur_every', 'ID_TEXT'),
('staff_checklist_cus_tasks', 'task_is_done', '?TIME'),
('leader_board', 'lb_member', '*MEMBER'),
('leader_board', 'lb_points', 'INTEGER'),
('leader_board', 'date_and_time', '*TIME'),
('actionlogs', 'id', '*AUTO'),
('actionlogs', 'the_type', 'ID_TEXT'),
('actionlogs', 'param_a', 'ID_TEXT'),
('actionlogs', 'param_b', 'SHORT_TEXT'),
('actionlogs', 'member_id', 'MEMBER'),
('actionlogs', 'ip', 'IP'),
('actionlogs', 'date_and_time', 'TIME'),
('staff_tips_dismissed', 't_member', '*MEMBER'),
('staff_tips_dismissed', 't_tip', '*ID_TEXT'),
('staff_links', 'id', '*AUTO'),
('staff_links', 'link', 'URLPATH'),
('staff_links', 'link_title', 'SHORT_TEXT'),
('staff_links', 'link_desc', 'LONG_TEXT'),
('feature_lifetime_monitor', 'content_id', '*ID_TEXT'),
('feature_lifetime_monitor', 'block_cache_id', '*ID_TEXT'),
('feature_lifetime_monitor', 'run_period', 'INTEGER');
INSERT INTO cms_db_meta (m_table, m_name, m_type) VALUES ('feature_lifetime_monitor', 'running_now', 'BINARY'),
('feature_lifetime_monitor', 'last_update', 'TIME'),
('failedlogins', 'id', '*AUTO'),
('failedlogins', 'failed_account', 'ID_TEXT'),
('failedlogins', 'date_and_time', 'TIME'),
('failedlogins', 'ip', 'IP'),
('f_member_custom_fields', 'field_28', 'LONG_TEXT'),
('f_member_custom_fields', 'field_29', 'SHORT_TEXT'),
('f_member_custom_fields', 'field_30', 'SHORT_TEXT'),
('f_member_custom_fields', 'field_31', 'SHORT_TEXT'),
('f_member_custom_fields', 'field_32', 'SHORT_TEXT'),
('f_member_custom_fields', 'field_33', 'LONG_TEXT'),
('f_member_custom_fields', 'field_34', 'SHORT_TEXT'),
('f_member_custom_fields', 'field_35', 'SHORT_TEXT'),
('f_member_custom_fields', 'field_36', 'SHORT_TEXT');

DROP TABLE IF EXISTS cms_db_meta_indices;

CREATE TABLE cms_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)
) CHARACTER SET=utf8mb4 engine=MyISAM;

INSERT INTO cms_db_meta_indices (i_table, i_name, i_fields) VALUES ('actionlogs', 'aip', 'ip'),
('actionlogs', 'athe_type', 'the_type'),
('actionlogs', 'ts', 'date_and_time'),
('actionlogs', 'xas', 'member_id'),
('aggregate_type_instances', 'aggregate_lookup', 'aggregate_label'),
('alternative_ids', 'resource_guid', 'resource_guid'),
('alternative_ids', 'resource_label', 'resource_label'),
('alternative_ids', 'resource_moniker', 'resource_moniker,resource_type'),
('alternative_ids', 'resource_moniker_uniq', 'resource_moniker,resource_resource_fs_hook'),
('attachments', 'attachmentlimitcheck', 'a_add_time'),
('attachments', 'ownedattachments', 'a_member_id'),
('authors', '#description', 'description'),
('authors', '#skills', 'skills'),
('authors', 'findmemberlink', 'member_id'),
('autosave', 'myautosaves', 'a_member_id'),
('award_archive', 'awardquicksearch', 'content_id'),
('award_types', '#a_description', 'a_description'),
('award_types', '#a_title', 'a_title'),
('banner_clicks', 'c_banner_id', 'c_banner_id'),
('banner_clicks', 'clicker_ip', 'c_ip_address'),
('banner_types', 'hottext', 't_comcode_inline'),
('banners', '#caption', 'caption'),
('banners', 'badd_date', 'add_date'),
('banners', 'banner_child_find', 'b_type'),
('banners', 'bvalidated', 'validated'),
('banners', 'campaign_remaining', 'campaign_remaining'),
('banners', 'expiry_date', 'expiry_date'),
('banners', 'the_type', 'the_type'),
('banners', 'topsites', 'hits_from,hits_to'),
('cache', 'cached_ford', 'date_and_time'),
('cache', 'cached_fore', 'cached_for'),
('cache', 'cached_forf', 'cached_for,identifier,the_theme,lang,staff_status,the_member,is_bot'),
('cache', 'cached_forh', 'the_theme'),
('cached_comcode_pages', '#cc_page_title', 'cc_page_title'),
('cached_comcode_pages', '#page_search__combined', 'cc_page_title,string_index'),
('cached_comcode_pages', '#string_index', 'string_index'),
('cached_comcode_pages', 'ccp_join', 'the_page,the_zone'),
('cached_comcode_pages', 'ftjoin_ccpt', 'cc_page_title'),
('cached_comcode_pages', 'ftjoin_ccsi', 'string_index'),
('calendar_events', '#e_content', 'e_content'),
('calendar_events', '#e_title', 'e_title');
INSERT INTO cms_db_meta_indices (i_table, i_name, i_fields) VALUES ('calendar_events', '#event_search__combined', 'e_title,e_content'),
('calendar_events', 'ces', 'e_submitter'),
('calendar_events', 'e_add_date', 'e_add_date'),
('calendar_events', 'e_type', 'e_type'),
('calendar_events', 'e_views', 'e_views'),
('calendar_events', 'eventat', 'e_start_year,e_start_month,e_start_day,e_start_hour,e_start_minute'),
('calendar_events', 'ftjoin_econtent', 'e_content'),
('calendar_events', 'ftjoin_etitle', 'e_title'),
('calendar_events', 'validated', 'validated'),
('calendar_jobs', 'applicablejobs', 'j_time'),
('calendar_types', '#t_title', 't_title'),
('captchas', 'si_time', 'si_time'),
('catalogue_cat_treecache', 'cc_ancestor_id', 'cc_ancestor_id'),
('catalogue_categories', '#cat_cat_search__combined', 'cc_title,cc_description'),
('catalogue_categories', '#cc_description', 'cc_description'),
('catalogue_categories', '#cc_title', 'cc_title'),
('catalogue_categories', 'cataloguefind', 'c_name'),
('catalogue_categories', 'catstoclean', 'cc_move_target'),
('catalogue_categories', 'cc_order', 'cc_order'),
('catalogue_categories', 'cc_parent_id', 'cc_parent_id'),
('catalogue_categories', 'ftjoin_ccdescrip', 'cc_description'),
('catalogue_categories', 'ftjoin_cctitle', 'cc_title'),
('catalogue_efv_float', 'cefv_f_combo', 'ce_id,cf_id'),
('catalogue_efv_float', 'fce_id', 'ce_id'),
('catalogue_efv_float', 'fcf_id', 'cf_id'),
('catalogue_efv_float', 'fcv_value', 'cv_value'),
('catalogue_efv_integer', 'cefv_i_combo', 'ce_id,cf_id'),
('catalogue_efv_integer', 'ice_id', 'ce_id'),
('catalogue_efv_integer', 'icf_id', 'cf_id'),
('catalogue_efv_integer', 'itv_value', 'cv_value'),
('catalogue_efv_long', '#lcv_value', 'cv_value'),
('catalogue_efv_long', 'cefv_l_combo', 'ce_id,cf_id'),
('catalogue_efv_long', 'lce_id', 'ce_id'),
('catalogue_efv_long', 'lcf_id', 'cf_id'),
('catalogue_efv_long_trans', '#cv_value', 'cv_value'),
('catalogue_efv_long_trans', 'cefv_lt_combo', 'ce_id,cf_id'),
('catalogue_efv_long_trans', 'ltce_id', 'ce_id'),
('catalogue_efv_long_trans', 'ltcf_id', 'cf_id'),
('catalogue_efv_long_trans', 'ltcv_value', 'cv_value'),
('catalogue_efv_short', '#scv_value', 'cv_value');
INSERT INTO cms_db_meta_indices (i_table, i_name, i_fields) VALUES ('catalogue_efv_short', 'cefv_s_combo', 'ce_id,cf_id'),
('catalogue_efv_short', 'iscv_value', 'cv_value'),
('catalogue_efv_short', 'sce_id', 'ce_id'),
('catalogue_efv_short', 'scf_id', 'cf_id'),
('catalogue_efv_short_trans', '#cv_value', 'cv_value'),
('catalogue_efv_short_trans', 'cefv_st_combo', 'ce_id,cf_id'),
('catalogue_efv_short_trans', 'stce_id', 'ce_id'),
('catalogue_efv_short_trans', 'stcf_id', 'cf_id'),
('catalogue_efv_short_trans', 'stcv_value', 'cv_value'),
('catalogue_entries', 'ce_add_date', 'ce_add_date'),
('catalogue_entries', 'ce_c_name', 'c_name'),
('catalogue_entries', 'ce_cc_id', 'cc_id'),
('catalogue_entries', 'ce_validated', 'ce_validated'),
('catalogue_entries', 'ce_views', 'ce_views'),
('catalogue_entries', 'ces', 'ce_submitter'),
('catalogue_entry_linkage', 'custom_fields', 'content_type,content_id'),
('catalogue_fields', '#cf_description', 'cf_description'),
('catalogue_fields', '#cf_name', 'cf_name'),
('catalogues', '#c_description', 'c_description');
INSERT INTO cms_db_meta_indices (i_table, i_name, i_fields) VALUES ('catalogues', '#c_title', 'c_title'),
('chargelog', '#reason', 'reason'),
('chat_active', 'active_ordering', 'date_and_time'),
('chat_active', 'member_select', 'member_id'),
('chat_active', 'room_select', 'room_id'),
('chat_events', 'event_ordering', 'e_date_and_time'),
('chat_messages', '#the_message', 'the_message'),
('chat_messages', 'ordering', 'date_and_time'),
('chat_messages', 'room_id', 'room_id'),
('chat_rooms', '#c_welcome', 'c_welcome'),
('chat_rooms', 'allow_list', 'allow_list(30)'),
('chat_rooms', 'first_public', 'is_im,id'),
('chat_rooms', 'is_im', 'is_im'),
('chat_rooms', 'room_name', 'room_name'),
('comcode_pages', 'p_add_date', 'p_add_date'),
('comcode_pages', 'p_order', 'p_order'),
('comcode_pages', 'p_submitter', 'p_submitter'),
('comcode_pages', 'p_validated', 'p_validated'),
('config', '#c_value_trans', 'c_value_trans'),
('content_privacy', 'friend_view', 'friend_view'),
('content_privacy', 'guest_view', 'guest_view'),
('content_privacy', 'member_view', 'member_view'),
('content_reviews', 'needs_review', 'next_review_time,content_type'),
('content_reviews', 'next_review_time', 'next_review_time,review_notification_happened'),
('cron_caching_requests', 'c_compound', 'c_codename,c_theme,c_lang,c_timezone'),
('cron_caching_requests', 'c_is_bot', 'c_is_bot'),
('cron_caching_requests', 'c_store_as_tempcode', 'c_store_as_tempcode'),
('custom_comcode', '#tag_description', 'tag_description'),
('custom_comcode', '#tag_title', 'tag_title'),
('db_meta', 'findtransfields', 'm_type'),
('digestives_tin', '#d_message', 'd_message'),
('digestives_tin', 'd_date_and_time', 'd_date_and_time'),
('digestives_tin', 'd_frequency', 'd_frequency'),
('digestives_tin', 'd_read', 'd_read'),
('digestives_tin', 'd_to_member_id', 'd_to_member_id'),
('digestives_tin', 'unread', 'd_to_member_id,d_read'),
('download_categories', '#category', 'category'),
('download_categories', '#description', 'description'),
('download_categories', '#dl_cat_search__combined', 'category,description'),
('download_categories', 'child_find', 'parent_id'),
('download_categories', 'ftjoin_dccat', 'category');
INSERT INTO cms_db_meta_indices (i_table, i_name, i_fields) VALUES ('download_categories', 'ftjoin_dcdescrip', 'description'),
('download_downloads', '#additional_details', 'additional_details'),
('download_downloads', '#description', 'description'),
('download_downloads', '#dl_search__combined', 'original_filename,download_data_mash'),
('download_downloads', '#download_data_mash', 'download_data_mash'),
('download_downloads', '#name', 'name'),
('download_downloads', '#original_filename', 'original_filename'),
('download_downloads', 'category_list', 'category_id'),
('download_downloads', 'ddl', 'download_licence'),
('download_downloads', 'dds', 'submitter'),
('download_downloads', 'download_views', 'download_views'),
('download_downloads', 'downloadauthor', 'author'),
('download_downloads', 'dvalidated', 'validated'),
('download_downloads', 'ftjoin_dadditional', 'additional_details'),
('download_downloads', 'ftjoin_ddescrip', 'description'),
('download_downloads', 'ftjoin_dname', 'name'),
('download_downloads', 'recent_downloads', 'add_date'),
('download_downloads', 'top_downloads', 'num_downloads'),
('download_logging', 'calculate_bandwidth', 'date_and_time'),
('edit_pings', 'edit_pings_on', 'the_page,the_type,the_id'),
('email_bounces', 'b_email_address', 'b_email_address'),
('email_bounces', 'b_time', 'b_time'),
('f_custom_fields', '#cf_description', 'cf_description'),
('f_custom_fields', '#cf_name', 'cf_name'),
('f_emoticons', 'relevantemoticons', 'e_relevance_level'),
('f_emoticons', 'topicemos', 'e_use_topics'),
('f_forums', '#f_description', 'f_description'),
('f_forums', '#f_intro_question', 'f_intro_question'),
('f_forums', 'cache_num_posts', 'f_cache_num_posts'),
('f_forums', 'f_position', 'f_position'),
('f_forums', 'findnamedforum', 'f_name'),
('f_forums', 'subforum_parenting', 'f_parent_forum'),
('f_group_join_log', 'join_time', 'join_time'),
('f_group_join_log', 'member_id', 'member_id'),
('f_group_join_log', 'usergroup_id', 'usergroup_id'),
('f_group_members', 'gm_group_id', 'gm_group_id'),
('f_group_members', 'gm_member_id', 'gm_member_id'),
('f_group_members', 'gm_validated', 'gm_validated'),
('f_groups', '#g_name', 'g_name'),
('f_groups', '#g_title', 'g_title');
INSERT INTO cms_db_meta_indices (i_table, i_name, i_fields) VALUES ('f_groups', '#groups_search__combined', 'g_name,g_title'),
('f_groups', 'ftjoin_gname', 'g_name'),
('f_groups', 'ftjoin_gtitle', 'g_title'),
('f_groups', 'gorder', 'g_order,id'),
('f_groups', 'hidden', 'g_hidden'),
('f_groups', 'is_default', 'g_is_default'),
('f_groups', 'is_presented_at_install', 'g_is_presented_at_install'),
('f_groups', 'is_private_club', 'g_is_private_club'),
('f_groups', 'is_super_admin', 'g_is_super_admin'),
('f_groups', 'is_super_moderator', 'g_is_super_moderator'),
('f_member_custom_fields', '#field_1', 'field_1'),
('f_member_custom_fields', '#field_2', 'field_2'),
('f_member_custom_fields', '#field_4', 'field_4'),
('f_member_custom_fields', '#mcf_ft_17', 'field_17'),
('f_member_custom_fields', '#mcf_ft_18', 'field_18'),
('f_member_custom_fields', '#mcf_ft_19', 'field_19'),
('f_member_custom_fields', '#mcf_ft_21', 'field_21'),
('f_member_custom_fields', '#mcf_ft_22', 'field_22'),
('f_member_custom_fields', '#mcf_ft_23', 'field_23');
INSERT INTO cms_db_meta_indices (i_table, i_name, i_fields) VALUES ('f_member_custom_fields', '#mcf_ft_24', 'field_24'),
('f_member_custom_fields', '#mcf_ft_25', 'field_25'),
('f_member_custom_fields', '#mcf_ft_26', 'field_26'),
('f_member_custom_fields', '#mcf_ft_28', 'field_28'),
('f_member_custom_fields', '#mcf_ft_29', 'field_29'),
('f_member_custom_fields', '#mcf_ft_3', 'field_3'),
('f_member_custom_fields', '#mcf_ft_30', 'field_30'),
('f_member_custom_fields', '#mcf_ft_31', 'field_31'),
('f_member_custom_fields', '#mcf_ft_32', 'field_32'),
('f_member_custom_fields', '#mcf_ft_33', 'field_33'),
('f_member_custom_fields', '#mcf_ft_34', 'field_34'),
('f_member_custom_fields', '#mcf_ft_35', 'field_35'),
('f_member_custom_fields', '#mcf_ft_36', 'field_36'),
('f_member_custom_fields', '#mcf_ft_5', 'field_5'),
('f_member_custom_fields', '#mcf_ft_6', 'field_6'),
('f_member_custom_fields', '#mcf_ft_7', 'field_7'),
('f_member_custom_fields', '#mcf_ft_8', 'field_8'),
('f_member_custom_fields', 'mcf1', 'field_1'),
('f_member_custom_fields', 'mcf10', 'field_10'),
('f_member_custom_fields', 'mcf11', 'field_11'),
('f_member_custom_fields', 'mcf12', 'field_12'),
('f_member_custom_fields', 'mcf13', 'field_13'),
('f_member_custom_fields', 'mcf14', 'field_14'),
('f_member_custom_fields', 'mcf15', 'field_15'),
('f_member_custom_fields', 'mcf16', 'field_16'),
('f_member_custom_fields', 'mcf2', 'field_2'),
('f_member_custom_fields', 'mcf20', 'field_20'),
('f_member_custom_fields', 'mcf25', 'field_25'),
('f_member_custom_fields', 'mcf26', 'field_26'),
('f_member_custom_fields', 'mcf27', 'field_27'),
('f_member_custom_fields', 'mcf29', 'field_29'),
('f_member_custom_fields', 'mcf3', 'field_3'),
('f_member_custom_fields', 'mcf30', 'field_30'),
('f_member_custom_fields', 'mcf31', 'field_31'),
('f_member_custom_fields', 'mcf32', 'field_32'),
('f_member_custom_fields', 'mcf34', 'field_34'),
('f_member_custom_fields', 'mcf35', 'field_35'),
('f_member_custom_fields', 'mcf36', 'field_36'),
('f_member_custom_fields', 'mcf4', 'field_4'),
('f_member_custom_fields', 'mcf5', 'field_5'),
('f_member_custom_fields', 'mcf6', 'field_6');
INSERT INTO cms_db_meta_indices (i_table, i_name, i_fields) VALUES ('f_member_custom_fields', 'mcf7', 'field_7'),
('f_member_custom_fields', 'mcf8', 'field_8'),
('f_members', '#m_pt_rules_text', 'm_pt_rules_text'),
('f_members', '#m_signature', 'm_signature'),
('f_members', '#search_user', 'm_username'),
('f_members', 'avatar_url', 'm_avatar_url'),
('f_members', 'birthdays', 'm_dob_day,m_dob_month'),
('f_members', 'external_auth_lookup', 'm_pass_hash_salted'),
('f_members', 'ftjoin_msig', 'm_signature'),
('f_members', 'last_visit_time', 'm_dob_month,m_dob_day,m_last_visit_time'),
('f_members', 'm_join_time', 'm_join_time'),
('f_members', 'menail', 'm_email_address'),
('f_members', 'primary_group', 'm_primary_group'),
('f_members', 'sort_post_count', 'm_cache_num_posts'),
('f_members', 'user_list', 'm_username'),
('f_members', 'whos_validated', 'm_validated'),
('f_multi_moderations', '#mm_name', 'mm_name'),
('f_password_history', 'p_member_id', 'p_member_id'),
('f_posts', '#p_post', 'p_post'),
('f_posts', '#p_title', 'p_title'),
('f_posts', '#posts_search__combined', 'p_post,p_title'),
('f_posts', 'deletebyip', 'p_ip_address'),
('f_posts', 'find_pp', 'p_intended_solely_for'),
('f_posts', 'in_topic', 'p_topic_id,p_time,id'),
('f_posts', 'in_topic_change_order', 'p_topic_id,p_last_edit_time,p_time,id'),
('f_posts', 'p_last_edit_time', 'p_last_edit_time'),
('f_posts', 'p_validated', 'p_validated'),
('f_posts', 'post_order_time', 'p_time,id'),
('f_posts', 'posts_by', 'p_poster,p_time'),
('f_posts', 'posts_by_in_forum', 'p_poster,p_cache_forum_id'),
('f_posts', 'posts_by_in_topic', 'p_poster,p_topic_id'),
('f_posts', 'posts_since', 'p_time,p_cache_forum_id'),
('f_posts', 'postsinforum', 'p_cache_forum_id'),
('f_posts', 'search_join', 'p_post'),
('f_read_logs', 'erase_old_read_logs', 'l_time'),
('f_topics', '#t_cache_first_post', 't_cache_first_post'),
('f_topics', '#t_description', 't_description'),
('f_topics', 'descriptionsearch', 't_description'),
('f_topics', 'forumlayer', 't_cache_first_title'),
('f_topics', 'in_forum', 't_forum_id');
INSERT INTO cms_db_meta_indices (i_table, i_name, i_fields) VALUES ('f_topics', 'ownedtopics', 't_cache_first_member_id'),
('f_topics', 't_cache_first_post_id', 't_cache_first_post_id'),
('f_topics', 't_cache_last_member_id', 't_cache_last_member_id'),
('f_topics', 't_cache_last_post_id', 't_cache_last_post_id'),
('f_topics', 't_cache_num_posts', 't_cache_num_posts'),
('f_topics', 't_cascading', 't_cascading'),
('f_topics', 't_cascading_or_forum', 't_cascading,t_forum_id'),
('f_topics', 't_num_views', 't_num_views'),
('f_topics', 't_pt_from', 't_pt_from'),
('f_topics', 't_pt_to', 't_pt_to'),
('f_topics', 't_validated', 't_validated'),
('f_topics', 'topic_order', 't_cascading,t_pinned,t_cache_last_time'),
('f_topics', 'topic_order_2', 't_forum_id,t_cascading,t_pinned,t_sunk,t_cache_last_time'),
('f_topics', 'topic_order_3', 't_forum_id,t_cascading,t_pinned,t_cache_last_time'),
('f_topics', 'topic_order_time', 't_cache_last_time'),
('f_topics', 'topic_order_time_2', 't_cache_first_time'),
('f_topics', 'unread_forums', 't_forum_id,t_cache_last_time'),
('f_usergroup_sub_mails', '#m_body', 'm_body'),
('f_usergroup_sub_mails', '#m_subject', 'm_subject');
INSERT INTO cms_db_meta_indices (i_table, i_name, i_fields) VALUES ('f_usergroup_subs', '#s_description', 's_description'),
('f_usergroup_subs', '#s_mail_end', 's_mail_end'),
('f_usergroup_subs', '#s_mail_start', 's_mail_start'),
('f_usergroup_subs', '#s_mail_uhoh', 's_mail_uhoh'),
('f_usergroup_subs', '#s_title', 's_title'),
('f_warnings', 'warningsmemberid', 'w_member_id'),
('f_welcome_emails', '#w_subject', 'w_subject'),
('f_welcome_emails', '#w_text', 'w_text'),
('failedlogins', 'failedlogins_by_ip', 'ip'),
('filedump', '#description', 'description'),
('galleries', '#description', 'description'),
('galleries', '#fullname', 'fullname'),
('galleries', '#gallery_search__combined', 'fullname,description'),
('galleries', 'ftjoin_gdescrip', 'description'),
('galleries', 'ftjoin_gfullname', 'fullname'),
('galleries', 'gadd_date', 'add_date'),
('galleries', 'parent_id', 'parent_id'),
('galleries', 'watermark_bottom_left', 'watermark_bottom_left'),
('galleries', 'watermark_bottom_right', 'watermark_bottom_right'),
('galleries', 'watermark_top_left', 'watermark_top_left'),
('galleries', 'watermark_top_right', 'watermark_top_right'),
('gifts', '#reason', 'reason'),
('gifts', 'giftsgiven', 'gift_from'),
('gifts', 'giftsreceived', 'gift_to'),
('group_page_access', 'group_id', 'group_id'),
('group_privileges', 'group_id', 'group_id'),
('group_zone_access', 'group_id', 'group_id'),
('hackattack', 'h_date_and_time', 'date_and_time'),
('hackattack', 'otherhacksby', 'ip'),
('images', '#description', 'description'),
('images', '#image_search__combined', 'description,title'),
('images', '#title', 'title'),
('images', 'category_list', 'cat'),
('images', 'ftjoin_dtitle', 'title'),
('images', 'ftjoin_idescription', 'description'),
('images', 'i_validated', 'validated'),
('images', 'iadd_date', 'add_date'),
('images', 'image_views', 'image_views'),
('images', 'xis', 'submitter'),
('link_tracker', 'c_url', 'c_url'),
('logged_mail_messages', 'combo', 'm_date_and_time,m_queued');
INSERT INTO cms_db_meta_indices (i_table, i_name, i_fields) VALUES ('logged_mail_messages', 'queued', 'm_queued'),
('logged_mail_messages', 'recentmessages', 'm_date_and_time'),
('match_key_messages', '#k_message', 'k_message'),
('member_category_access', 'mcamember_id', 'member_id'),
('member_category_access', 'mcaname', 'module_the_name,category_name'),
('member_page_access', 'mzamember_id', 'member_id'),
('member_page_access', 'mzaname', 'page_name,zone_name'),
('member_privileges', 'member_privileges_member', 'member_id'),
('member_privileges', 'member_privileges_name', 'privilege,the_page,module_the_name,category_name'),
('member_tracking', 'mt_id', 'mt_page,mt_id,mt_type'),
('member_tracking', 'mt_page', 'mt_page'),
('member_tracking', 'mt_time', 'mt_time'),
('member_zone_access', 'mzamember_id', 'member_id'),
('member_zone_access', 'mzazone_name', 'zone_name'),
('menu_items', '#i_caption', 'i_caption'),
('menu_items', '#i_caption_long', 'i_caption_long'),
('menu_items', 'menu_extraction', 'i_menu'),
('messages_to_render', 'forsession', 'r_session_id'),
('news', '#news', 'news'),
('news', '#news_article', 'news_article'),
('news', '#news_search__combined', 'title,news,news_article'),
('news', '#title', 'title'),
('news', 'findnewscat', 'news_category'),
('news', 'ftjoin_ititle', 'title'),
('news', 'ftjoin_nnews', 'news'),
('news', 'ftjoin_nnewsa', 'news_article'),
('news', 'headlines', 'date_and_time,id'),
('news', 'nes', 'submitter'),
('news', 'news_views', 'news_views'),
('news', 'newsauthor', 'author'),
('news', 'nvalidated', 'validated'),
('news_categories', '#nc_title', 'nc_title'),
('news_categories', 'ncs', 'nc_owner'),
('news_category_entries', 'news_entry_category', 'news_entry_category'),
('newsletter_drip_send', 'd_inject_time', 'd_inject_time'),
('newsletter_drip_send', 'd_to_email', 'd_to_email'),
('newsletter_subscribe', 'peopletosendto', 'the_level'),
('newsletter_subscribers', 'code_confirm', 'code_confirm'),
('newsletter_subscribers', 'email', 'email'),
('newsletter_subscribers', 'welcomemails', 'join_time');
INSERT INTO cms_db_meta_indices (i_table, i_name, i_fields) VALUES ('newsletters', '#description', 'description'),
('newsletters', '#title', 'title'),
('notifications_enabled', 'l_code_category', 'l_code_category'),
('notifications_enabled', 'l_member_id', 'l_member_id,l_notification_code'),
('notifications_enabled', 'l_notification_code', 'l_notification_code'),
('poll', '#option1', 'option1'),
('poll', '#option10', 'option10'),
('poll', '#option2', 'option2'),
('poll', '#option3', 'option3'),
('poll', '#option4', 'option4'),
('poll', '#option5', 'option5'),
('poll', '#option6', 'option6'),
('poll', '#option7', 'option7'),
('poll', '#option8', 'option8'),
('poll', '#option9', 'option9'),
('poll', '#poll_search__combined', 'question,option1,option2,option3,option4,option5'),
('poll', '#question', 'question'),
('poll', 'date_and_time', 'date_and_time'),
('poll', 'ftjoin_po1', 'option1');
INSERT INTO cms_db_meta_indices (i_table, i_name, i_fields) VALUES ('poll', 'ftjoin_po2', 'option2'),
('poll', 'ftjoin_po3', 'option3'),
('poll', 'ftjoin_po4', 'option4'),
('poll', 'ftjoin_po5', 'option5'),
('poll', 'ftjoin_pq', 'question'),
('poll', 'get_current', 'is_current'),
('poll', 'padd_time', 'add_time'),
('poll', 'poll_views', 'poll_views'),
('poll', 'ps', 'submitter'),
('poll_votes', 'v_vote_for', 'v_vote_for'),
('poll_votes', 'v_voter_id', 'v_voter_id'),
('poll_votes', 'v_voter_ip', 'v_voter_ip'),
('post_tokens', 'generation_time', 'generation_time'),
('pstore_customs', '#c_description', 'c_description'),
('pstore_customs', '#c_mail_body', 'c_mail_body'),
('pstore_customs', '#c_mail_subject', 'c_mail_subject'),
('pstore_customs', '#c_title', 'c_title'),
('pstore_permissions', '#p_description', 'p_description'),
('pstore_permissions', '#p_mail_body', 'p_mail_body'),
('pstore_permissions', '#p_mail_subject', 'p_mail_subject'),
('pstore_permissions', '#p_title', 'p_title'),
('quiz_question_answers', '#q_answer_text', 'q_answer_text'),
('quiz_question_answers', '#q_explanation', 'q_explanation'),
('quiz_questions', '#q_question_extra_text', 'q_question_extra_text'),
('quiz_questions', '#q_question_text', 'q_question_text'),
('quizzes', '#q_end_text', 'q_end_text'),
('quizzes', '#q_end_text_fail', 'q_end_text_fail'),
('quizzes', '#q_name', 'q_name'),
('quizzes', '#q_start_text', 'q_start_text'),
('quizzes', '#quiz_search__combined', 'q_start_text,q_name'),
('quizzes', 'ftjoin_qstarttext', 'q_start_text'),
('quizzes', 'q_validated', 'q_validated'),
('rating', 'alt_key', 'rating_for_type,rating_for_id'),
('rating', 'rating_for_id', 'rating_for_id'),
('review_supplement', 'rating_for_id', 'r_rating_for_id'),
('revisions', 'actionlog_link', 'r_actionlog_id'),
('revisions', 'lookup_by_cat', 'r_resource_type,r_category_id'),
('revisions', 'lookup_by_id', 'r_resource_type,r_resource_id'),
('revisions', 'moderatorlog_link', 'r_moderatorlog_id'),
('searches_logged', '#past_search_ft', 's_primary'),
('searches_logged', 'past_search', 's_primary');
INSERT INTO cms_db_meta_indices (i_table, i_name, i_fields) VALUES ('seo_meta', '#meta_description', 'meta_description'),
('seo_meta', 'alt_key', 'meta_for_type,meta_for_id'),
('seo_meta', 'ftjoin_dmeta_description', 'meta_description'),
('seo_meta_keywords', '#meta_keyword', 'meta_keyword'),
('seo_meta_keywords', 'ftjoin_dmeta_keywords', 'meta_keyword'),
('seo_meta_keywords', 'keywords_alt_key', 'meta_for_type,meta_for_id'),
('sessions', 'delete_old', 'last_activity'),
('sessions', 'member_id', 'member_id'),
('sessions', 'userat', 'the_zone,the_page,the_id'),
('shopping_cart', 'ordered_by', 'ordered_by'),
('shopping_cart', 'product_id', 'product_id'),
('shopping_cart', 'session_id', 'session_id'),
('shopping_logging', 'calculate_bandwidth', 'date_and_time'),
('shopping_order', 'finddispatchable', 'order_status'),
('shopping_order', 'soadd_date', 'add_date'),
('shopping_order', 'soc_member', 'c_member'),
('shopping_order', 'sosession_id', 'session_id'),
('shopping_order_addresses', 'order_id', 'order_id'),
('shopping_order_details', 'order_id', 'order_id'),
('shopping_order_details', 'p_id', 'p_id'),
('sitemap_cache', 'is_deleted', 'is_deleted'),
('sitemap_cache', 'last_updated', 'last_updated'),
('sitemap_cache', 'set_number', 'set_number,last_updated'),
('sms_log', 'sms_log_for', 's_member_id,s_time'),
('sms_log', 'sms_trigger_ip', 's_trigger_ip'),
('stats', 'browser', 'browser'),
('stats', 'date_and_time', 'date_and_time'),
('stats', 'member_track_1', 'member_id'),
('stats', 'member_track_2', 'ip'),
('stats', 'member_track_3', 'member_id,date_and_time'),
('stats', 'member_track_4', 'session_id'),
('stats', 'milliseconds', 'milliseconds'),
('stats', 'operating_system', 'operating_system'),
('stats', 'pages', 'the_page'),
('stats', 'referer', 'referer'),
('temp_block_permissions', 'p_session_id', 'p_session_id'),
('theme_images', 'theme', 'theme,lang'),
('ticket_types', '#ticket_type_name', 'ticket_type_name'),
('trackbacks', 'trackback_for_id', 'trackback_for_id'),
('trackbacks', 'trackback_for_type', 'trackback_for_type');
INSERT INTO cms_db_meta_indices (i_table, i_name, i_fields) VALUES ('trackbacks', 'trackback_time', 'trackback_time'),
('translate', '#tsearch', 'text_original'),
('translate', 'decache', 'text_parsed(2)'),
('translate', 'equiv_lang', 'text_original(4)'),
('translate', 'importance_level', 'importance_level'),
('url_id_monikers', 'uim_moniker', 'm_moniker'),
('url_id_monikers', 'uim_monrev', 'm_moniker_reversed'),
('url_id_monikers', 'uim_page_link', 'm_resource_page,m_resource_type,m_resource_id'),
('url_title_cache', 't_url', 't_url'),
('urls_checked', 'url', 'url(200)'),
('usersonline_track', 'peak_track', 'peak'),
('values', 'date_and_time', 'date_and_time'),
('video_transcoding', 't_local_id', 't_local_id'),
('videos', '#description', 'description'),
('videos', '#title', 'title'),
('videos', '#video_search__combined', 'description,title'),
('videos', 'category_list', 'cat'),
('videos', 'ftjoin_dtitle', 'title'),
('videos', 'ftjoin_vdescription', 'description');
INSERT INTO cms_db_meta_indices (i_table, i_name, i_fields) VALUES ('videos', 'v_validated', 'validated'),
('videos', 'vadd_date', 'add_date'),
('videos', 'video_views', 'video_views'),
('videos', 'vs', 'submitter'),
('wiki_pages', '#description', 'description'),
('wiki_pages', '#title', 'title'),
('wiki_pages', '#wiki_search__combined', 'title,description'),
('wiki_pages', 'ftjoin_spd', 'description'),
('wiki_pages', 'ftjoin_spt', 'title'),
('wiki_pages', 'sadd_date', 'add_date'),
('wiki_pages', 'sps', 'submitter'),
('wiki_pages', 'wiki_views', 'wiki_views'),
('wiki_posts', '#the_message', 'the_message'),
('wiki_posts', 'cdate_and_time', 'date_and_time'),
('wiki_posts', 'ftjoin_spm', 'the_message'),
('wiki_posts', 'posts_on_page', 'page_id'),
('wiki_posts', 'spos', 'member_id'),
('wiki_posts', 'svalidated', 'validated'),
('wiki_posts', 'wiki_views', 'wiki_views'),
('zones', '#zone_header_text', 'zone_header_text'),
('zones', '#zone_title', 'zone_title');

DROP TABLE IF EXISTS cms_digestives_consumed;

CREATE TABLE cms_digestives_consumed (
    c_time integer unsigned NOT NULL,
    c_frequency integer NOT NULL,
    c_member_id integer NOT NULL,
    PRIMARY KEY (c_frequency, c_member_id)
) CHARACTER SET=utf8mb4 engine=MyISAM;

DROP TABLE IF EXISTS cms_digestives_tin;

CREATE TABLE cms_digestives_tin (
    d_message longtext NOT NULL,
    d_no_cc tinyint(1) NOT NULL,
    d_from_member_id integer NULL,
    d_to_member_id integer NOT NULL,
    d_priority tinyint NOT NULL,
    d_date_and_time integer unsigned NOT NULL,
    d_notification_code varchar(80) NOT NULL,
    d_code_category varchar(255) NOT NULL,
    d_frequency integer NOT NULL,
    d_read tinyint(1) NOT NULL,
    d_subject longtext NOT NULL,
    id integer unsigned auto_increment NOT NULL,
    d_message__text_parsed longtext NOT NULL,
    d_message__source_user integer DEFAULT 1 NOT NULL,
    PRIMARY KEY (id)
) CHARACTER SET=utf8mb4 engine=MyISAM;

ALTER TABLE cms_digestives_tin ADD FULLTEXT d_message (d_message);

ALTER TABLE cms_digestives_tin ADD INDEX d_date_and_time (d_date_and_time);

ALTER TABLE cms_digestives_tin ADD INDEX d_frequency (d_frequency);

ALTER TABLE cms_digestives_tin ADD INDEX d_read (d_read);

ALTER TABLE cms_digestives_tin ADD INDEX d_to_member_id (d_to_member_id);

ALTER TABLE cms_digestives_tin ADD INDEX unread (d_to_member_id,d_read);

DROP TABLE IF EXISTS cms_download_categories;

CREATE TABLE cms_download_categories (
    notes longtext NOT NULL,
    rep_image varchar(255) BINARY NOT NULL,
    description longtext NOT NULL,
    parent_id integer NULL,
    category longtext NOT NULL,
    add_date integer unsigned NOT NULL,
    id integer unsigned auto_increment NOT NULL,
    description__text_parsed longtext NOT NULL,
    description__source_user integer DEFAULT 1 NOT NULL,
    PRIMARY KEY (id)
) CHARACTER SET=utf8mb4 engine=MyISAM;

ALTER TABLE cms_download_categories ADD FULLTEXT category (category);

ALTER TABLE cms_download_categories ADD FULLTEXT description (description);

ALTER TABLE cms_download_categories ADD FULLTEXT dl_cat_search__combined (category,description);

ALTER TABLE cms_download_categories ADD INDEX child_find (parent_id);

ALTER TABLE cms_download_categories ADD INDEX ftjoin_dccat (category(250));

ALTER TABLE cms_download_categories ADD INDEX ftjoin_dcdescrip (description(250));

INSERT INTO cms_download_categories (id, category, parent_id, add_date, notes, description, rep_image, description__text_parsed, description__source_user) VALUES (1, 'Downloads home', NULL, 1618200920, '', '', '', 'return unserialize(\"a:5:{i:0;a:1:{i:0;a:1:{i:0;a:5:{i:0;s:40:\\\"string_attach_6073c9543eb8f8.90077135_21\\\";i:1;a:0:{}i:2;i:1;i:3;s:0:\\\"\\\";i:4;s:0:\\\"\\\";}}}i:1;a:0:{}i:2;s:10:\\\":container\\\";i:3;N;i:4;a:1:{s:40:\\\"string_attach_6073c9543eb8f8.90077135_21\\\";s:69:\\\"\\$tpl_funcs[\'string_attach_6073c9543eb8f8.90077135_21\']=\\\"echo \\\\\\\"\\\\\\\";\\\";\\n\\\";}}\");
', 1);

DROP TABLE IF EXISTS cms_download_downloads;

CREATE TABLE cms_download_downloads (
    download_cost integer NOT NULL,
    download_submitter_gets_points tinyint(1) NOT NULL,
    submitter integer NOT NULL,
    original_filename varchar(255) NOT NULL,
    rep_image varchar(255) BINARY NOT NULL,
    validated tinyint(1) NOT NULL,
    download_licence integer NULL,
    download_data_mash longtext NOT NULL,
    url_redirect varchar(255) BINARY NOT NULL,
    additional_details longtext NOT NULL,
    num_downloads integer NOT NULL,
    out_mode_id integer NULL,
    add_date integer unsigned NOT NULL,
    edit_date integer unsigned NULL,
    download_views integer NOT NULL,
    notes longtext NOT NULL,
    author varchar(80) NOT NULL,
    description longtext NOT NULL,
    url varchar(255) BINARY NOT NULL,
    allow_trackbacks tinyint(1) NOT NULL,
    allow_comments tinyint NOT NULL,
    allow_rating tinyint(1) NOT NULL,
    file_size integer NULL,
    default_pic integer NOT NULL,
    name longtext NOT NULL,
    category_id integer NOT NULL,
    id integer unsigned auto_increment NOT NULL,
    additional_details__text_parsed longtext NOT NULL,
    additional_details__source_user integer DEFAULT 1 NOT NULL,
    description__text_parsed longtext NOT NULL,
    description__source_user integer DEFAULT 1 NOT NULL,
    PRIMARY KEY (id)
) CHARACTER SET=utf8mb4 engine=MyISAM;

ALTER TABLE cms_download_downloads ADD FULLTEXT additional_details (additional_details);

ALTER TABLE cms_download_downloads ADD FULLTEXT description (description);

ALTER TABLE cms_download_downloads ADD FULLTEXT dl_search__combined (original_filename,download_data_mash);

ALTER TABLE cms_download_downloads ADD FULLTEXT download_data_mash (download_data_mash);

ALTER TABLE cms_download_downloads ADD FULLTEXT name (name);

ALTER TABLE cms_download_downloads ADD FULLTEXT original_filename (original_filename);

ALTER TABLE cms_download_downloads ADD INDEX category_list (category_id);

ALTER TABLE cms_download_downloads ADD INDEX ddl (download_licence);

ALTER TABLE cms_download_downloads ADD INDEX dds (submitter);

ALTER TABLE cms_download_downloads ADD INDEX download_views (download_views);

ALTER TABLE cms_download_downloads ADD INDEX downloadauthor (author);

ALTER TABLE cms_download_downloads ADD INDEX dvalidated (validated);

ALTER TABLE cms_download_downloads ADD INDEX ftjoin_dadditional (additional_details(250));

ALTER TABLE cms_download_downloads ADD INDEX ftjoin_ddescrip (description(250));

ALTER TABLE cms_download_downloads ADD INDEX ftjoin_dname (name(250));

ALTER TABLE cms_download_downloads ADD INDEX recent_downloads (add_date);

ALTER TABLE cms_download_downloads ADD INDEX top_downloads (num_downloads);

DROP TABLE IF EXISTS cms_download_licences;

CREATE TABLE cms_download_licences (
    l_title varchar(255) NOT NULL,
    id integer unsigned auto_increment NOT NULL,
    l_text longtext NOT NULL,
    PRIMARY KEY (id)
) CHARACTER SET=utf8mb4 engine=MyISAM;

DROP TABLE IF EXISTS cms_download_logging;

CREATE TABLE cms_download_logging (
    member_id integer NOT NULL,
    ip varchar(40) NOT NULL,
    date_and_time integer unsigned NOT NULL,
    id integer NOT NULL,
    PRIMARY KEY (member_id, id)
) CHARACTER SET=utf8mb4 engine=MyISAM;

ALTER TABLE cms_download_logging ADD INDEX calculate_bandwidth (date_and_time);

DROP TABLE IF EXISTS cms_edit_pings;

CREATE TABLE cms_edit_pings (
    the_type varchar(80) NOT NULL,
    id integer unsigned auto_increment NOT NULL,
    the_page varchar(80) NOT NULL,
    the_id varchar(80) NOT NULL,
    the_time integer unsigned NOT NULL,
    the_member integer NOT NULL,
    PRIMARY KEY (id)
) CHARACTER SET=utf8mb4 engine=MyISAM;

ALTER TABLE cms_edit_pings ADD INDEX edit_pings_on (the_page,the_type,the_id);

DROP TABLE IF EXISTS cms_email_bounces;

CREATE TABLE cms_email_bounces (
    b_body longtext NOT NULL,
    b_subject varchar(255) NOT NULL,
    b_time integer unsigned NOT NULL,
    b_email_address varchar(255) NOT NULL,
    id integer unsigned auto_increment NOT NULL,
    PRIMARY KEY (id)
) CHARACTER SET=utf8mb4 engine=MyISAM;

ALTER TABLE cms_email_bounces ADD INDEX b_email_address (b_email_address(250));

ALTER TABLE cms_email_bounces ADD INDEX b_time (b_time);

DROP TABLE IF EXISTS cms_f_custom_fields;

CREATE TABLE cms_f_custom_fields (
    cf_options varchar(255) NOT NULL,
    cf_name longtext NOT NULL,
    cf_description longtext NOT NULL,
    cf_default longtext NOT NULL,
    cf_locked tinyint(1) NOT NULL,
    id integer unsigned auto_increment NOT NULL,
    cf_show_on_join_form tinyint(1) NOT NULL,
    cf_encrypted tinyint(1) NOT NULL,
    cf_only_group longtext NOT NULL,
    cf_order integer NOT NULL,
    cf_show_in_post_previews tinyint(1) NOT NULL,
    cf_show_in_posts tinyint(1) NOT NULL,
    cf_required tinyint(1) NOT NULL,
    cf_type varchar(80) NOT NULL,
    cf_owner_set tinyint(1) NOT NULL,
    cf_owner_view tinyint(1) NOT NULL,
    cf_public_view tinyint(1) NOT NULL,
    PRIMARY KEY (id)
) CHARACTER SET=utf8mb4 engine=MyISAM;

ALTER TABLE cms_f_custom_fields ADD FULLTEXT cf_description (cf_description);

ALTER TABLE cms_f_custom_fields ADD FULLTEXT cf_name (cf_name);

INSERT INTO cms_f_custom_fields (id, cf_locked, cf_name, cf_description, cf_default, cf_public_view, cf_owner_view, cf_owner_set, cf_type, cf_required, cf_show_in_posts, cf_show_in_post_previews, cf_order, cf_only_group, cf_encrypted, cf_show_on_join_form, cf_options) VALUES (1, 0, 'About me', 'Some personally written information.', '', 1, 1, 1, 'long_trans', 0, 0, 0, 0, '', 0, 0, ''),
(2, 0, 'Interests', 'A summary of your interests.', '', 1, 1, 1, 'long_trans', 0, 1, 1, 1, '', 0, 0, ''),
(3, 0, 'Occupation', 'Your occupation.', '', 1, 1, 1, 'short_text', 0, 0, 0, 2, '', 0, 0, ''),
(4, 0, 'Staff notes', 'Notes on this member, only viewable by staff.', '', 0, 0, 0, 'long_trans', 0, 0, 0, 3, '', 0, 0, ''),
(5, 0, 'Skype ID', 'Your Skype ID.', '', 1, 1, 1, 'short_text', 0, 0, 0, 4, '', 0, 0, ''),
(6, 0, 'Facebook profile', 'A link to your Facebook profile.', '', 1, 1, 1, 'short_text', 0, 0, 0, 5, '', 0, 0, ''),
(7, 0, 'Google+ profile', 'A link to your Google+ profile.', '', 1, 1, 1, 'short_text', 0, 0, 0, 6, '', 0, 0, ''),
(8, 0, 'Twitter account', 'Your Twitter name (for example, \'charlie12345\').', '', 1, 1, 1, 'short_text', 0, 0, 0, 7, '', 0, 0, ''),
(9, 1, 'cms_smart_topic_notification', '', '0', 0, 0, 1, 'tick', 1, 0, 0, 8, '', 0, 0, ''),
(10, 1, 'cms_points_gained_chat', '', '0', 0, 0, 0, 'integer', 0, 0, 0, 9, '', 0, 0, ''),
(11, 1, 'cms_points_used', '', '0', 0, 0, 0, 'integer', 0, 0, 0, 10, '', 0, 0, ''),
(12, 1, 'cms_gift_points_used', '', '0', 0, 0, 0, 'integer', 0, 0, 0, 11, '', 0, 0, ''),
(13, 1, 'cms_points_gained_given', '', '0', 0, 0, 0, 'integer', 0, 0, 0, 12, '', 0, 0, ''),
(14, 1, 'cms_points_gained_rating', '', '0', 0, 0, 0, 'integer', 0, 0, 0, 13, '', 0, 0, ''),
(15, 1, 'cms_points_gained_visiting', '', '0', 0, 0, 0, 'integer', 0, 0, 0, 14, '', 0, 0, ''),
(16, 1, 'cms_points_gained_voting', '', '0', 0, 0, 0, 'integer', 0, 0, 0, 15, '', 0, 0, ''),
(17, 0, 'cms_currency', '', '|AED|AFA|ALL|AMD|ANG|AOK|AON|ARA|ARP|ARS|AUD|AWG|AZM|BAM|BBD|BDT|BGL|BHD|BIF|BMD|BND|BOB|BOP|BRC|BRL|BRR|BSD|BTN|BWP|BYR|BZD|CAD|CDZ|CHF|CLF|CLP|CNY|COP|CRC|CSD|CUP|CVE|CYP|CZK|DJF|DKK|DOP|DZD|EEK|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHC|GIP|GMD|GNS|GQE|GTQ|GWP|GYD|HKD|HNL|HRD|HRK|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LSM|LTL|LVL|LYD|MAD|MDL|MGF|MKD|MLF|MMK|MNT|MOP|MRO|MTL|MUR|MVR|MWK|MXN|MYR|MZM|NAD|NGN|NIC|NOK|NPR|NZD|OMR|PAB|PEI|PEN|PGK|PHP|PKR|PLN|PYG|QAR|ROL|RUB|RWF|SAR|SBD|SCR|SDD|SDP|SEK|SGD|SHP|SIT|SKK|SLL|SOS|SRG|STD|SUR|SVC|SYP|SZL|THB|TJR|TMM|TND|TOP|TPE|TRL|TTD|TWD|TZS|UAH|UAK|UGS|USD|UYU|UZS|VEB|VND|VUV|WST|XAF|XCD|XOF|XPF|YDD|YER|ZAL|ZAR|ZMK|ZWD', 0, 0, 1, 'list', 0, 0, 0, 16, '', 0, 0, ''),
(18, 0, 'cms_payment_cardholder_name', '', '', 0, 0, 1, 'short_text', 0, 0, 0, 17, '', 1, 0, ''),
(19, 0, 'cms_payment_type', '', 'American Express|Delta|Diners Card|JCB|Master Card|Solo|Switch|Visa', 0, 0, 1, 'list', 0, 0, 0, 18, '', 1, 0, ''),
(20, 0, 'cms_payment_card_number', '', '', 0, 0, 1, 'integer', 0, 0, 0, 19, '', 1, 0, ''),
(21, 0, 'cms_payment_card_start_date', '', 'mm/yy', 0, 0, 1, 'short_text', 0, 0, 0, 20, '', 1, 0, ''),
(22, 0, 'cms_payment_card_expiry_date', '', 'mm/yy', 0, 0, 1, 'short_text', 0, 0, 0, 21, '', 1, 0, ''),
(23, 0, 'cms_payment_card_issue_number', '', '', 0, 0, 1, 'short_text', 0, 0, 0, 22, '', 1, 0, ''),
(24, 0, 'cms_payment_card_cv2', '', '', 0, 0, 1, 'short_text', 0, 0, 0, 23, '', 1, 0, ''),
(25, 1, 'cms_sites', '', '', 0, 0, 0, 'short_text', 0, 0, 0, 24, '', 0, 0, ''),
(26, 0, 'cms_role', '', '', 0, 0, 1, 'short_text', 0, 0, 0, 25, '', 0, 0, ''),
(27, 1, 'cms_points_gained_wiki', '', '0', 0, 0, 0, 'integer', 0, 0, 0, 26, '', 0, 0, ''),
(28, 0, 'cms_street_address', '', '', 0, 0, 1, 'long_text', 0, 0, 0, 27, '', 0, 0, ''),
(29, 0, 'cms_city', '', '', 0, 0, 1, 'short_text', 0, 0, 0, 28, '', 0, 0, ''),
(30, 0, 'cms_county', '', '', 0, 0, 1, 'short_text', 0, 0, 0, 29, '', 0, 0, ''),
(31, 0, 'cms_state', '', '', 0, 0, 1, 'short_text', 0, 0, 0, 30, '', 0, 0, ''),
(32, 0, 'cms_post_code', '', '', 0, 0, 1, 'short_text', 0, 0, 0, 31, '', 0, 0, ''),
(33, 0, 'cms_country', '', '|AF=Afghanistan|AL=Albania|DZ=Algeria|AS=American Samoa|AD=Andorra|AO=Angola|AI=Anguilla|AQ=Antarctica|AG=Antigua and Barbuda|AR=Argentina|AM=Armenia|AW=Aruba|AU=Australia|AT=Austria|AZ=Azerbaijan|BS=Bahamas|BH=Bahrain|BD=Bangladesh|BB=Barbados|BY=Belarus|BE=Belgium|BZ=Belize|BJ=Benin|BM=Bermuda|BT=Bhutan|BO=Bolivia|BA=Bosnia and Herzegovina|BW=Botswana|BV=Bouvet Island|BR=Brazil|IO=British Indian Ocean Territory|VG=British Virgin Islands|BN=Brunei|BG=Bulgaria|BF=Burkina Faso|BI=Burundi|KH=Cambodia|CM=Cameroon|CA=Canada|CV=Cape Verde|KY=Cayman Islands|CF=Central African Republic|TD=Chad|CL=Chile|CN=China|CX=Christmas Island|CC=Cocos [Keeling] Islands|CO=Colombia|KM=Comoros|CG=Congo|CD=Congo (Dem. Rep.)|CK=Cook Islands|CR=Costa Rica|HR=Croatia|CU=Cuba|CY=Cyprus|CZ=Czech Republic|DK=Denmark|DJ=Djibouti|DM=Dominica|DO=Dominican Republic|DD=East Germany|TL=East Timor|EC=Ecuador|EG=Egypt|SV=El Salvador|GQ=Equatorial Guinea|ER=Eritrea|EE=Estonia|ET=Ethiopia|FK=Falkland Islands|FO=Faroe Islands|FJ=Fiji Islands|FI=Finland|FR=France|GF=French Guiana|PF=French Polynesia|TF=French Southern Territories|GA=Gabon|GM=Gambia|GE=Georgia|DE=Germany|GH=Ghana|GI=Gibraltar|GR=Greece|GL=Greenland|GD=Grenada|GP=Guadeloupe|GU=Guam|GT=Guatemala|GG=Guernsey and Alderney|GN=Guinea|GW=Guinea-Bissau|GY=Guyana|HT=Haiti|HM=Heard Island and McDonald Islands|HN=Honduras|HK=Hong Kong SAR China|HU=Hungary|IS=Iceland|IN=India|ID=Indonesia|IR=Iran|IQ=Iraq|IE=Ireland|IM=Isle of Man|IL=Israel|IT=Italy|CI=Ivory Coast|JM=Jamaica|JP=Japan|JE=Jersey|JO=Jordan|KZ=Kazakhstan|KE=Kenya|KI=Kiribati|KP=Korea (North)|KR=Korea (South)|XK=Kosovo|KW=Kuwait|KG=Kyrgyzstan|LA=Laos|LV=Latvia|LB=Lebanon|LS=Lesotho|LR=Liberia|LY=Libya|LI=Liechtenstein|LT=Lithuania|LU=Luxembourg|MO=Macau SAR China|MK=Macedonia|MG=Madagascar|MW=Malawi|MY=Malaysia|MV=Maldives|ML=Mali|MT=Malta|MH=Marshall Islands|MQ=Martinique|MR=Mauritania|MU=Mauritius|YT=Mayotte|FX=Metropolitan France|MX=Mexico|FM=Micronesia|MD=Moldova|MC=Monaco|MN=Mongolia|ME=Montenegro|MS=Montserrat|MA=Morocco|MZ=Mozambique|MM=Myanmar|NA=Namibia|NR=Nauru|NP=Nepal|NL=Netherlands|AN=Netherlands Antilles|NT=Neutral Zone|NC=New Caledonia|NZ=New Zealand|NI=Nicaragua|NE=Niger|NG=Nigeria|NU=Niue|NF=Norfolk Island|MP=Northern Mariana Islands|NO=Norway|OM=Oman|PK=Pakistan|PW=Palau|PS=Palestine|PA=Panama|PG=Papua New Guinea|PY=Paraguay|YD=People\'s Democratic Republic of Yemen|PE=Peru|PH=Philippines|PN=Pitcairn Islands|PL=Poland|PT=Portugal|PR=Puerto Rico|QA=Qatar|RO=Romania|RU=Russia|RW=Rwanda|RE=Réunion|BL=Saint Barthélemy|SH=Saint Helena|KN=Saint Kitts and Nevis|LC=Saint Lucia|MF=Saint Martin|PM=Saint Pierre and Miquelon|VC=Saint Vincent and The Grenadines|WS=Samoa|SM=San Marino|SA=Saudi Arabia|SN=Senegal|RS=Serbia|CS=Serbia and Montenegro|SC=Seychelles|SL=Sierra Leone|SG=Singapore|SK=Slovakia|SI=Slovenia|SB=Solomon Islands|SO=Somalia|ZA=South Africa|GS=South Georgia and the South Sandwich Islands|ES=Spain|LK=Sri Lanka|SD=Sudan|SR=Suriname|SJ=Svalbard and Jan Mayen|SZ=Swaziland|SE=Sweden|CH=Switzerland|SY=Syria|ST=São Tomé and Príncipe|TW=Taiwan|TJ=Tajikistan|TZ=Tanzania|TH=Thailand|TG=Togo|TK=Tokelau|TO=Tonga|TT=Trinidad and Tobago|TN=Tunisia|TR=Turkey|TM=Turkmenistan|TC=Turks and Caicos Islands|TV=Tuvalu|UG=Uganda|UA=Ukraine|SU=Union of Soviet Socialist Republics|AE=United Arab Emirates|GB=United Kingdom|UM=United States Minor Outlying Islands|US=United States of America|UY=Uruguay|UZ=Uzbekistan|VU=Vanuatu|VA=Vatican City|VE=Venezuela|VN=Vietnam|VI=Virgin Islands of the United States|WF=Wallis and Futuna|EH=Western Sahara|YE=Yemen|ZM=Zambia|ZW=Zimbabwe|AX=Åland Islands', 0, 0, 1, 'list', 0, 0, 0, 32, '', 0, 0, ''),
(34, 0, 'cms_firstname', '', '', 1, 1, 1, 'short_text', 0, 0, 0, 33, '', 0, 0, ''),
(35, 0, 'cms_lastname', '', '', 1, 1, 1, 'short_text', 0, 0, 0, 34, '', 0, 0, ''),
(36, 0, 'cms_mobile_phone_number', 'This should be the mobile phone number in international format, devoid of any national or international outgoing access codes. For instance, a typical UK (44) number might be nationally known as \'01234 123456\', but internationally and without outgoing access codes would be \'441234123456\'.', '', 0, 0, 1, 'short_text', 0, 0, 0, 35, '', 0, 0, '');

DROP TABLE IF EXISTS cms_f_emoticons;

CREATE TABLE cms_f_emoticons (
    e_is_special tinyint(1) NOT NULL,
    e_code varchar(80) NOT NULL,
    e_theme_img_code varchar(255) NOT NULL,
    e_relevance_level integer NOT NULL,
    e_use_topics tinyint(1) NOT NULL,
    PRIMARY KEY (e_code)
) CHARACTER SET=utf8mb4 engine=MyISAM;

ALTER TABLE cms_f_emoticons ADD INDEX relevantemoticons (e_relevance_level);

ALTER TABLE cms_f_emoticons ADD INDEX topicemos (e_use_topics);

INSERT INTO cms_f_emoticons (e_code, e_theme_img_code, e_relevance_level, e_use_topics, e_is_special) VALUES (':P', 'cns_emoticons/cheeky', 0, 1, 0),
(':\'(', 'cns_emoticons/cry', 0, 1, 0),
(':dry:', 'cns_emoticons/dry', 0, 1, 0),
(':$', 'cns_emoticons/blush', 0, 1, 0),
(';)', 'cns_emoticons/wink', 0, 0, 0),
('O_o', 'cns_emoticons/blink', 0, 1, 0),
(':wub:', 'cns_emoticons/wub', 0, 1, 0),
(':cool:', 'cns_emoticons/cool', 0, 1, 0),
(':lol:', 'cns_emoticons/lol', 0, 1, 0),
(':(', 'cns_emoticons/sad', 0, 1, 0),
(':)', 'cns_emoticons/smile', 0, 0, 0),
(':thumbs:', 'cns_emoticons/thumbs', 0, 1, 0),
(':|', 'cns_emoticons/mellow', 0, 0, 0),
(':ninja:', 'cns_emoticons/ph34r', 0, 1, 0),
(':o', 'cns_emoticons/shocked', 0, 1, 0),
(':offtopic:', 'cns_emoticons/offtopic', 1, 0, 0),
(':rolleyes:', 'cns_emoticons/rolleyes', 1, 1, 0),
(':D', 'cns_emoticons/grin', 1, 1, 0),
('^_^', 'cns_emoticons/glee', 1, 1, 0),
('(K)', 'cns_emoticons/kiss', 1, 0, 0),
(':S', 'cns_emoticons/confused', 1, 1, 0),
(':@', 'cns_emoticons/angry', 1, 1, 0),
(':shake:', 'cns_emoticons/shake', 1, 1, 0),
(':hand:', 'cns_emoticons/hand', 1, 1, 0),
(':drool:', 'cns_emoticons/drool', 1, 1, 0),
(':devil:', 'cns_emoticons/devil', 1, 1, 0),
(':party:', 'cns_emoticons/party', 1, 0, 0),
(':constipated:', 'cns_emoticons/constipated', 1, 1, 0),
(':depressed:', 'cns_emoticons/depressed', 1, 1, 0),
(':zzz:', 'cns_emoticons/zzz', 1, 1, 0),
(':whistle:', 'cns_emoticons/whistle', 1, 0, 0),
(':upsidedown:', 'cns_emoticons/upsidedown', 1, 1, 0),
(':sick:', 'cns_emoticons/sick', 1, 1, 0),
(':shutup:', 'cns_emoticons/shutup', 1, 0, 0),
(':sarcy:', 'cns_emoticons/sarcy', 1, 1, 0),
(':puppyeyes:', 'cns_emoticons/puppyeyes', 1, 1, 0),
(':nod:', 'cns_emoticons/nod', 1, 0, 0),
(':nerd:', 'cns_emoticons/nerd', 1, 1, 0),
(':king:', 'cns_emoticons/king', 1, 1, 0),
(':birthday:', 'cns_emoticons/birthday', 1, 1, 0),
(':cyborg:', 'cns_emoticons/cyborg', 1, 0, 0);
INSERT INTO cms_f_emoticons (e_code, e_theme_img_code, e_relevance_level, e_use_topics, e_is_special) VALUES (':hippie:', 'cns_emoticons/hippie', 1, 1, 0),
(':ninja2:', 'cns_emoticons/ninja2', 1, 1, 0),
(':rockon:', 'cns_emoticons/rockon', 1, 0, 0),
(':sinner:', 'cns_emoticons/sinner', 1, 0, 0),
(':guitar:', 'cns_emoticons/guitar', 1, 0, 0),
(':angel:', 'cns_emoticons/angel', 1, 1, 0),
(':cowboy:', 'cns_emoticons/cowboy', 1, 1, 0),
(':fight:', 'cns_emoticons/fight', 1, 1, 0),
(':goodbye:', 'cns_emoticons/goodbye', 1, 1, 0),
(':idea:', 'cns_emoticons/idea', 1, 0, 0),
(':boat:', 'cns_emoticons/boat', 1, 0, 0),
(':fishing:', 'cns_emoticons/fishing', 1, 0, 0),
(':reallybadday:', 'cns_emoticons/reallybadday', 1, 0, 0),
(':christmas:', 'cns_emoticons/christmas', 1, 0, 0);

DROP TABLE IF EXISTS cms_f_forum_groupings;

CREATE TABLE cms_f_forum_groupings (
    id integer unsigned auto_increment NOT NULL,
    c_title varchar(255) NOT NULL,
    c_description longtext NOT NULL,
    c_expanded_by_default tinyint(1) NOT NULL,
    PRIMARY KEY (id)
) CHARACTER SET=utf8mb4 engine=MyISAM;

INSERT INTO cms_f_forum_groupings (id, c_title, c_description, c_expanded_by_default) VALUES (1, 'General', '', 1),
(2, 'Staff', '', 1);

DROP TABLE IF EXISTS cms_f_forum_intro_ip;

CREATE TABLE cms_f_forum_intro_ip (
    i_forum_id integer NOT NULL,
    i_ip varchar(40) NOT NULL,
    PRIMARY KEY (i_forum_id, i_ip)
) CHARACTER SET=utf8mb4 engine=MyISAM;

DROP TABLE IF EXISTS cms_f_forum_intro_member;

CREATE TABLE cms_f_forum_intro_member (
    i_forum_id integer NOT NULL,
    i_member_id integer NOT NULL,
    PRIMARY KEY (i_forum_id, i_member_id)
) CHARACTER SET=utf8mb4 engine=MyISAM;

DROP TABLE IF EXISTS cms_f_forums;

CREATE TABLE cms_f_forums (
    f_forum_grouping_id integer NULL,
    id integer unsigned auto_increment NOT NULL,
    f_name varchar(255) NOT NULL,
    f_description longtext NOT NULL,
    f_parent_forum integer NULL,
    f_position integer NOT NULL,
    f_order_sub_alpha tinyint(1) NOT NULL,
    f_post_count_increment tinyint(1) NOT NULL,
    f_intro_question longtext NOT NULL,
    f_intro_answer varchar(255) NOT NULL,
    f_cache_num_topics integer NOT NULL,
    f_cache_last_topic_id integer NULL,
    f_cache_num_posts integer NOT NULL,
    f_allows_anonymous_posts tinyint(1) NOT NULL,
    f_is_threaded tinyint(1) NOT NULL,
    f_order varchar(80) NOT NULL,
    f_redirection varchar(255) NOT NULL,
    f_cache_last_forum_id integer NULL,
    f_cache_last_member_id integer NULL,
    f_cache_last_username varchar(255) NOT NULL,
    f_cache_last_time integer unsigned NULL,
    f_cache_last_title varchar(255) NOT NULL,
    f_description__text_parsed longtext NOT NULL,
    f_description__source_user integer DEFAULT 1 NOT NULL,
    f_intro_question__text_parsed longtext NOT NULL,
    f_intro_question__source_user integer DEFAULT 1 NOT NULL,
    PRIMARY KEY (id)
) CHARACTER SET=utf8mb4 engine=MyISAM;

ALTER TABLE cms_f_forums ADD FULLTEXT f_description (f_description);

ALTER TABLE cms_f_forums ADD FULLTEXT f_intro_question (f_intro_question);

ALTER TABLE cms_f_forums ADD INDEX cache_num_posts (f_cache_num_posts);

ALTER TABLE cms_f_forums ADD INDEX f_position (f_position);

ALTER TABLE cms_f_forums ADD INDEX findnamedforum (f_name(250));

ALTER TABLE cms_f_forums ADD INDEX subforum_parenting (f_parent_forum);

INSERT INTO cms_f_forums (id, f_name, f_description, f_forum_grouping_id, f_parent_forum, f_position, f_order_sub_alpha, f_post_count_increment, f_intro_question, f_intro_answer, f_cache_num_topics, f_cache_num_posts, f_cache_last_topic_id, f_cache_last_title, f_cache_last_time, f_cache_last_username, f_cache_last_member_id, f_cache_last_forum_id, f_redirection, f_order, f_is_threaded, f_allows_anonymous_posts, f_description__text_parsed, f_description__source_user, f_intro_question__text_parsed, f_intro_question__source_user) VALUES (1, 'Forum home', '', NULL, NULL, 1, 0, 1, '', '', 0, 0, NULL, '', NULL, '', NULL, NULL, '', 'last_post', 0, 0, 'return unserialize(\"a:5:{i:0;a:1:{i:0;a:1:{i:0;a:5:{i:0;s:39:\\\"string_attach_6073c938d23c68.19467884_1\\\";i:1;a:0:{}i:2;i:1;i:3;s:0:\\\"\\\";i:4;s:0:\\\"\\\";}}}i:1;a:0:{}i:2;s:10:\\\":container\\\";i:3;N;i:4;a:1:{s:39:\\\"string_attach_6073c938d23c68.19467884_1\\\";s:68:\\\"\\$tpl_funcs[\'string_attach_6073c938d23c68.19467884_1\']=\\\"echo \\\\\\\"\\\\\\\";\\\";\\n\\\";}}\");
', 1, 'return unserialize(\"a:5:{i:0;a:1:{i:0;a:1:{i:0;a:5:{i:0;s:39:\\\"string_attach_6073c938d23c68.19467884_2\\\";i:1;a:0:{}i:2;i:1;i:3;s:0:\\\"\\\";i:4;s:0:\\\"\\\";}}}i:1;a:0:{}i:2;s:10:\\\":container\\\";i:3;N;i:4;a:1:{s:39:\\\"string_attach_6073c938d23c68.19467884_2\\\";s:68:\\\"\\$tpl_funcs[\'string_attach_6073c938d23c68.19467884_2\']=\\\"echo \\\\\\\"\\\\\\\";\\\";\\n\\\";}}\");
', 1),
(2, 'General chat', '', 1, 1, 1, 0, 1, '', '', 0, 0, NULL, '', NULL, '', NULL, NULL, '', 'last_post', 0, 0, 'return unserialize(\"a:5:{i:0;a:1:{i:0;a:1:{i:0;a:5:{i:0;s:39:\\\"string_attach_6073c938d23c68.19467884_3\\\";i:1;a:0:{}i:2;i:1;i:3;s:0:\\\"\\\";i:4;s:0:\\\"\\\";}}}i:1;a:0:{}i:2;s:10:\\\":container\\\";i:3;N;i:4;a:1:{s:39:\\\"string_attach_6073c938d23c68.19467884_3\\\";s:68:\\\"\\$tpl_funcs[\'string_attach_6073c938d23c68.19467884_3\']=\\\"echo \\\\\\\"\\\\\\\";\\\";\\n\\\";}}\");
', 1, 'return unserialize(\"a:5:{i:0;a:1:{i:0;a:1:{i:0;a:5:{i:0;s:39:\\\"string_attach_6073c938d23c68.19467884_4\\\";i:1;a:0:{}i:2;i:1;i:3;s:0:\\\"\\\";i:4;s:0:\\\"\\\";}}}i:1;a:0:{}i:2;s:10:\\\":container\\\";i:3;N;i:4;a:1:{s:39:\\\"string_attach_6073c938d23c68.19467884_4\\\";s:68:\\\"\\$tpl_funcs[\'string_attach_6073c938d23c68.19467884_4\']=\\\"echo \\\\\\\"\\\\\\\";\\\";\\n\\\";}}\");
', 1),
(3, 'Reported posts forum', '', 2, 1, 1, 0, 1, '', '', 0, 0, NULL, '', NULL, '', NULL, NULL, '', 'last_post', 0, 0, 'return unserialize(\"a:5:{i:0;a:1:{i:0;a:1:{i:0;a:5:{i:0;s:39:\\\"string_attach_6073c938d23c68.19467884_5\\\";i:1;a:0:{}i:2;i:1;i:3;s:0:\\\"\\\";i:4;s:0:\\\"\\\";}}}i:1;a:0:{}i:2;s:10:\\\":container\\\";i:3;N;i:4;a:1:{s:39:\\\"string_attach_6073c938d23c68.19467884_5\\\";s:68:\\\"\\$tpl_funcs[\'string_attach_6073c938d23c68.19467884_5\']=\\\"echo \\\\\\\"\\\\\\\";\\\";\\n\\\";}}\");
', 1, 'return unserialize(\"a:5:{i:0;a:1:{i:0;a:1:{i:0;a:5:{i:0;s:39:\\\"string_attach_6073c938d23c68.19467884_6\\\";i:1;a:0:{}i:2;i:1;i:3;s:0:\\\"\\\";i:4;s:0:\\\"\\\";}}}i:1;a:0:{}i:2;s:10:\\\":container\\\";i:3;N;i:4;a:1:{s:39:\\\"string_attach_6073c938d23c68.19467884_6\\\";s:68:\\\"\\$tpl_funcs[\'string_attach_6073c938d23c68.19467884_6\']=\\\"echo \\\\\\\"\\\\\\\";\\\";\\n\\\";}}\");
', 1),
(4, 'Trash', '', 2, 1, 1, 0, 1, '', '', 0, 0, NULL, '', NULL, '', NULL, NULL, '', 'last_post', 0, 0, 'return unserialize(\"a:5:{i:0;a:1:{i:0;a:1:{i:0;a:5:{i:0;s:39:\\\"string_attach_6073c938d23c68.19467884_7\\\";i:1;a:0:{}i:2;i:1;i:3;s:0:\\\"\\\";i:4;s:0:\\\"\\\";}}}i:1;a:0:{}i:2;s:10:\\\":container\\\";i:3;N;i:4;a:1:{s:39:\\\"string_attach_6073c938d23c68.19467884_7\\\";s:68:\\\"\\$tpl_funcs[\'string_attach_6073c938d23c68.19467884_7\']=\\\"echo \\\\\\\"\\\\\\\";\\\";\\n\\\";}}\");
', 1, 'return unserialize(\"a:5:{i:0;a:1:{i:0;a:1:{i:0;a:5:{i:0;s:39:\\\"string_attach_6073c938d23c68.19467884_8\\\";i:1;a:0:{}i:2;i:1;i:3;s:0:\\\"\\\";i:4;s:0:\\\"\\\";}}}i:1;a:0:{}i:2;s:10:\\\":container\\\";i:3;N;i:4;a:1:{s:39:\\\"string_attach_6073c938d23c68.19467884_8\\\";s:68:\\\"\\$tpl_funcs[\'string_attach_6073c938d23c68.19467884_8\']=\\\"echo \\\\\\\"\\\\\\\";\\\";\\n\\\";}}\");
', 1),
(5, 'Website comment topics', '', 1, 1, 1, 0, 1, '', '', 0, 0, NULL, '', NULL, '', NULL, NULL, '', 'last_post', 1, 0, 'return unserialize(\"a:5:{i:0;a:1:{i:0;a:1:{i:0;a:5:{i:0;s:39:\\\"string_attach_6073c938d23c68.19467884_9\\\";i:1;a:0:{}i:2;i:1;i:3;s:0:\\\"\\\";i:4;s:0:\\\"\\\";}}}i:1;a:0:{}i:2;s:10:\\\":container\\\";i:3;N;i:4;a:1:{s:39:\\\"string_attach_6073c938d23c68.19467884_9\\\";s:68:\\\"\\$tpl_funcs[\'string_attach_6073c938d23c68.19467884_9\']=\\\"echo \\\\\\\"\\\\\\\";\\\";\\n\\\";}}\");
', 1, 'return unserialize(\"a:5:{i:0;a:1:{i:0;a:1:{i:0;a:5:{i:0;s:40:\\\"string_attach_6073c938d23c68.19467884_10\\\";i:1;a:0:{}i:2;i:1;i:3;s:0:\\\"\\\";i:4;s:0:\\\"\\\";}}}i:1;a:0:{}i:2;s:10:\\\":container\\\";i:3;N;i:4;a:1:{s:40:\\\"string_attach_6073c938d23c68.19467884_10\\\";s:69:\\\"\\$tpl_funcs[\'string_attach_6073c938d23c68.19467884_10\']=\\\"echo \\\\\\\"\\\\\\\";\\\";\\n\\\";}}\");
', 1),
(6, 'Staff', '', 2, 1, 1, 0, 1, '', '', 1, 1, 1, 'Welcome to the forums', 1618200890, 'System', 1, 6, '', 'last_post', 0, 0, 'return unserialize(\"a:5:{i:0;a:1:{i:0;a:1:{i:0;a:5:{i:0;s:40:\\\"string_attach_6073c938d23c68.19467884_11\\\";i:1;a:0:{}i:2;i:1;i:3;s:0:\\\"\\\";i:4;s:0:\\\"\\\";}}}i:1;a:0:{}i:2;s:10:\\\":container\\\";i:3;N;i:4;a:1:{s:40:\\\"string_attach_6073c938d23c68.19467884_11\\\";s:69:\\\"\\$tpl_funcs[\'string_attach_6073c938d23c68.19467884_11\']=\\\"echo \\\\\\\"\\\\\\\";\\\";\\n\\\";}}\");
', 1, 'return unserialize(\"a:5:{i:0;a:1:{i:0;a:1:{i:0;a:5:{i:0;s:40:\\\"string_attach_6073c938d23c68.19467884_12\\\";i:1;a:0:{}i:2;i:1;i:3;s:0:\\\"\\\";i:4;s:0:\\\"\\\";}}}i:1;a:0:{}i:2;s:10:\\\":container\\\";i:3;N;i:4;a:1:{s:40:\\\"string_attach_6073c938d23c68.19467884_12\\\";s:69:\\\"\\$tpl_funcs[\'string_attach_6073c938d23c68.19467884_12\']=\\\"echo \\\\\\\"\\\\\\\";\\\";\\n\\\";}}\");
', 1),
(7, 'Website \"Contact Us\" messages', '', 2, 1, 1, 0, 1, '', '', 0, 0, NULL, '', NULL, '', NULL, NULL, '', 'last_post', 0, 0, 'return unserialize(\"a:5:{i:0;a:1:{i:0;a:1:{i:0;a:5:{i:0;s:39:\\\"string_attach_6073c93fa0ea63.32334955_2\\\";i:1;a:0:{}i:2;i:1;i:3;s:0:\\\"\\\";i:4;s:0:\\\"\\\";}}}i:1;a:0:{}i:2;s:10:\\\":container\\\";i:3;N;i:4;a:1:{s:39:\\\"string_attach_6073c93fa0ea63.32334955_2\\\";s:68:\\\"\\$tpl_funcs[\'string_attach_6073c93fa0ea63.32334955_2\']=\\\"echo \\\\\\\"\\\\\\\";\\\";\\n\\\";}}\");
', 1, 'return unserialize(\"a:5:{i:0;a:1:{i:0;a:1:{i:0;a:5:{i:0;s:39:\\\"string_attach_6073c93fa0ea63.32334955_3\\\";i:1;a:0:{}i:2;i:1;i:3;s:0:\\\"\\\";i:4;s:0:\\\"\\\";}}}i:1;a:0:{}i:2;s:10:\\\":container\\\";i:3;N;i:4;a:1:{s:39:\\\"string_attach_6073c93fa0ea63.32334955_3\\\";s:68:\\\"\\$tpl_funcs[\'string_attach_6073c93fa0ea63.32334955_3\']=\\\"echo \\\\\\\"\\\\\\\";\\\";\\n\\\";}}\");
', 1),
(8, 'Website support tickets', '', 2, 1, 1, 0, 1, '', '', 0, 0, NULL, '', NULL, '', NULL, NULL, '', 'last_post', 0, 0, 'return unserialize(\"a:5:{i:0;a:1:{i:0;a:1:{i:0;a:5:{i:0;s:40:\\\"string_attach_6073c9543eb8f8.90077135_24\\\";i:1;a:0:{}i:2;i:1;i:3;s:0:\\\"\\\";i:4;s:0:\\\"\\\";}}}i:1;a:0:{}i:2;s:10:\\\":container\\\";i:3;N;i:4;a:1:{s:40:\\\"string_attach_6073c9543eb8f8.90077135_24\\\";s:69:\\\"\\$tpl_funcs[\'string_attach_6073c9543eb8f8.90077135_24\']=\\\"echo \\\\\\\"\\\\\\\";\\\";\\n\\\";}}\");
', 1, 'return unserialize(\"a:5:{i:0;a:1:{i:0;a:1:{i:0;a:5:{i:0;s:40:\\\"string_attach_6073c9543eb8f8.90077135_25\\\";i:1;a:0:{}i:2;i:1;i:3;s:0:\\\"\\\";i:4;s:0:\\\"\\\";}}}i:1;a:0:{}i:2;s:10:\\\":container\\\";i:3;N;i:4;a:1:{s:40:\\\"string_attach_6073c9543eb8f8.90077135_25\\\";s:69:\\\"\\$tpl_funcs[\'string_attach_6073c9543eb8f8.90077135_25\']=\\\"echo \\\\\\\"\\\\\\\";\\\";\\n\\\";}}\");
', 1);

DROP TABLE IF EXISTS cms_f_group_join_log;

CREATE TABLE cms_f_group_join_log (
    member_id integer NOT NULL,
    usergroup_id integer NULL,
    join_time integer unsigned NOT NULL,
    id integer unsigned auto_increment NOT NULL,
    PRIMARY KEY (id)
) CHARACTER SET=utf8mb4 engine=MyISAM;

ALTER TABLE cms_f_group_join_log ADD INDEX join_time (join_time);

ALTER TABLE cms_f_group_join_log ADD INDEX member_id (member_id);

ALTER TABLE cms_f_group_join_log ADD INDEX usergroup_id (usergroup_id);

DROP TABLE IF EXISTS cms_f_group_member_timeouts;

CREATE TABLE cms_f_group_member_timeouts (
    timeout integer unsigned NOT NULL,
    group_id integer NOT NULL,
    member_id integer NOT NULL,
    PRIMARY KEY (group_id, member_id)
) CHARACTER SET=utf8mb4 engine=MyISAM;

DROP TABLE IF EXISTS cms_f_group_members;

CREATE TABLE cms_f_group_members (
    gm_group_id integer NOT NULL,
    gm_validated tinyint(1) NOT NULL,
    gm_member_id integer NOT NULL,
    PRIMARY KEY (gm_group_id, gm_member_id)
) CHARACTER SET=utf8mb4 engine=MyISAM;

ALTER TABLE cms_f_group_members ADD INDEX gm_group_id (gm_group_id);

ALTER TABLE cms_f_group_members ADD INDEX gm_member_id (gm_member_id);

ALTER TABLE cms_f_group_members ADD INDEX gm_validated (gm_validated);

DROP TABLE IF EXISTS cms_f_groups;

CREATE TABLE cms_f_groups (
    g_name longtext 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,
    id integer unsigned auto_increment NOT NULL,
    g_group_leader integer NULL,
    g_title longtext NOT NULL,
    g_is_super_moderator tinyint(1) NOT NULL,
    g_promotion_target integer NULL,
    g_promotion_threshold integer NULL,
    g_flood_control_access_secs integer NOT NULL,
    g_is_private_club tinyint(1) NOT NULL,
    g_open_membership tinyint(1) NOT NULL,
    g_rank_image_pri_only tinyint(1) NOT NULL,
    g_order integer NOT NULL,
    g_hidden tinyint(1) NOT NULL,
    g_rank_image varchar(80) NOT NULL,
    g_enquire_on_new_ips tinyint(1) NOT NULL,
    g_max_sig_length_comcode integer NOT NULL,
    g_max_avatar_height integer NOT NULL,
    g_max_post_length_comcode integer NOT NULL,
    g_max_avatar_width integer NOT NULL,
    g_max_attachments_per_post integer NOT NULL,
    g_max_daily_upload_mb integer NOT NULL,
    g_flood_control_submit_secs integer NOT NULL,
    g_gift_points_base integer NOT NULL,
    g_gift_points_per_day integer NOT NULL,
    PRIMARY KEY (id)
) CHARACTER SET=utf8mb4 engine=MyISAM;

ALTER TABLE cms_f_groups ADD FULLTEXT g_name (g_name);

ALTER TABLE cms_f_groups ADD FULLTEXT g_title (g_title);

ALTER TABLE cms_f_groups ADD FULLTEXT groups_search__combined (g_name,g_title);

ALTER TABLE cms_f_groups ADD INDEX ftjoin_gname (g_name(250));

ALTER TABLE cms_f_groups ADD INDEX ftjoin_gtitle (g_title(250));

ALTER TABLE cms_f_groups ADD INDEX gorder (g_order,id);

ALTER TABLE cms_f_groups ADD INDEX hidden (g_hidden);

ALTER TABLE cms_f_groups ADD INDEX is_default (g_is_default);

ALTER TABLE cms_f_groups ADD INDEX is_presented_at_install (g_is_presented_at_install);

ALTER TABLE cms_f_groups ADD INDEX is_private_club (g_is_private_club);

ALTER TABLE cms_f_groups ADD INDEX is_super_admin (g_is_super_admin);

ALTER TABLE cms_f_groups ADD INDEX is_super_moderator (g_is_super_moderator);

INSERT INTO cms_f_groups (id, g_name, g_is_default, g_is_presented_at_install, g_is_super_admin, g_is_super_moderator, g_group_leader, g_title, g_promotion_target, g_promotion_threshold, g_flood_control_submit_secs, g_flood_control_access_secs, g_gift_points_base, g_gift_points_per_day, g_max_daily_upload_mb, g_max_attachments_per_post, g_max_avatar_width, g_max_avatar_height, g_max_post_length_comcode, g_max_sig_length_comcode, g_enquire_on_new_ips, g_rank_image, g_hidden, g_order, g_rank_image_pri_only, g_open_membership, g_is_private_club) VALUES (1, 'Guests', 0, 0, 0, 0, NULL, 'Guest user', NULL, NULL, 0, 0, 25, 1, 70, 50, 100, 100, 30000, 700, 0, '', 0, 0, 1, 0, 0),
(2, 'Administrators', 0, 0, 1, 0, NULL, 'Site director', NULL, NULL, 0, 0, 25, 1, 70, 50, 100, 100, 30000, 700, 0, 'cns_rank_images/admin', 0, 1, 1, 0, 0),
(3, 'Super-moderators', 0, 0, 0, 1, NULL, 'Site staff', NULL, NULL, 0, 0, 25, 1, 70, 50, 100, 100, 30000, 700, 0, 'cns_rank_images/mod', 0, 2, 1, 0, 0),
(4, 'Super-members', 0, 0, 0, 0, NULL, 'Super-member', NULL, NULL, 0, 0, 25, 1, 70, 50, 100, 100, 30000, 700, 0, '', 0, 3, 1, 0, 0),
(5, 'Local hero', 0, 0, 0, 0, NULL, 'Standard member', NULL, NULL, 0, 0, 25, 1, 70, 50, 100, 100, 30000, 700, 0, 'cns_rank_images/4', 0, 4, 1, 0, 0),
(6, 'Old timer', 0, 0, 0, 0, NULL, 'Standard member', 5, 10000, 0, 0, 25, 1, 70, 50, 100, 100, 30000, 700, 0, 'cns_rank_images/3', 0, 5, 1, 0, 0),
(7, 'Local', 0, 0, 0, 0, NULL, 'Standard member', 6, 2500, 0, 0, 25, 1, 70, 50, 100, 100, 30000, 700, 0, 'cns_rank_images/2', 0, 6, 1, 0, 0),
(8, 'Regular', 0, 0, 0, 0, NULL, 'Standard member', 7, 400, 0, 0, 25, 1, 70, 50, 100, 100, 30000, 700, 0, 'cns_rank_images/1', 0, 7, 1, 0, 0),
(9, 'Newbie', 0, 0, 0, 0, NULL, 'Standard member', 8, 100, 0, 0, 25, 1, 70, 50, 100, 100, 30000, 700, 0, 'cns_rank_images/0', 0, 8, 1, 0, 0),
(10, 'Probation', 0, 0, 0, 0, NULL, 'Placed on temporary probation', NULL, NULL, 0, 0, 25, 1, 70, 50, 100, 100, 30000, 700, 0, '', 0, 9, 1, 0, 0);

DROP TABLE IF EXISTS cms_f_invites;

CREATE TABLE cms_f_invites (
    i_taken tinyint(1) NOT NULL,
    i_time integer unsigned NOT NULL,
    i_email_address varchar(255) NOT NULL,
    i_inviter integer NOT NULL,
    id integer unsigned auto_increment NOT NULL,
    PRIMARY KEY (id)
) CHARACTER SET=utf8mb4 engine=MyISAM;

DROP TABLE IF EXISTS cms_f_member_cpf_perms;

CREATE TABLE cms_f_member_cpf_perms (
    member_id integer NOT NULL,
    field_id integer NOT NULL,
    member_view tinyint(1) NOT NULL,
    friend_view tinyint(1) NOT NULL,
    group_view varchar(255) NOT NULL,
    guest_view tinyint(1) NOT NULL,
    PRIMARY KEY (member_id, field_id)
) CHARACTER SET=utf8mb4 engine=MyISAM;

DROP TABLE IF EXISTS cms_f_member_custom_fields;

CREATE TABLE cms_f_member_custom_fields (
    field_31 varchar(255) NOT NULL,
    field_23 longtext NOT NULL,
    field_24 longtext NOT NULL,
    field_25 varchar(255) NOT NULL,
    field_26 varchar(255) NOT NULL,
    field_27 integer NULL,
    field_28 longtext NOT NULL,
    field_29 varchar(255) NOT NULL,
    field_30 varchar(255) NOT NULL,
    field_32 varchar(255) NOT NULL,
    field_33 longtext NOT NULL,
    field_34 varchar(255) NOT NULL,
    field_35 varchar(255) NOT NULL,
    field_22 longtext NOT NULL,
    field_21 longtext NOT NULL,
    field_20 integer NULL,
    field_19 longtext NOT NULL,
    field_18 longtext NOT NULL,
    field_17 longtext NOT NULL,
    field_16 integer NULL,
    field_15 integer NULL,
    field_14 integer NULL,
    field_13 integer NULL,
    field_12 integer NULL,
    field_11 integer NULL,
    field_36 varchar(255) NOT NULL,
    field_10 integer NULL,
    field_9 integer NULL,
    field_8 varchar(255) NOT NULL,
    field_7 varchar(255) NOT NULL,
    field_6 varchar(255) NOT NULL,
    field_5 varchar(255) NOT NULL,
    mf_member_id integer NOT NULL,
    field_1 longtext NOT NULL,
    field_2 longtext NOT NULL,
    field_3 varchar(255) NOT NULL,
    field_4 longtext NOT NULL,
    field_1__text_parsed longtext NOT NULL,
    field_1__source_user integer DEFAULT 1 NOT NULL,
    field_2__text_parsed longtext NOT NULL,
    field_2__source_user integer DEFAULT 1 NOT NULL,
    field_4__text_parsed longtext NOT NULL,
    field_4__source_user integer DEFAULT 1 NOT NULL,
    PRIMARY KEY (mf_member_id)
) CHARACTER SET=utf8mb4 engine=MyISAM;

ALTER TABLE cms_f_member_custom_fields ADD FULLTEXT field_1 (field_1);

ALTER TABLE cms_f_member_custom_fields ADD FULLTEXT field_2 (field_2);

ALTER TABLE cms_f_member_custom_fields ADD FULLTEXT field_4 (field_4);

ALTER TABLE cms_f_member_custom_fields ADD FULLTEXT mcf_ft_17 (field_17);

ALTER TABLE cms_f_member_custom_fields ADD FULLTEXT mcf_ft_18 (field_18);

ALTER TABLE cms_f_member_custom_fields ADD FULLTEXT mcf_ft_19 (field_19);

ALTER TABLE cms_f_member_custom_fields ADD FULLTEXT mcf_ft_21 (field_21);

ALTER TABLE cms_f_member_custom_fields ADD FULLTEXT mcf_ft_22 (field_22);

ALTER TABLE cms_f_member_custom_fields ADD FULLTEXT mcf_ft_23 (field_23);

ALTER TABLE cms_f_member_custom_fields ADD FULLTEXT mcf_ft_24 (field_24);

ALTER TABLE cms_f_member_custom_fields ADD FULLTEXT mcf_ft_25 (field_25);

ALTER TABLE cms_f_member_custom_fields ADD FULLTEXT mcf_ft_26 (field_26);

ALTER TABLE cms_f_member_custom_fields ADD FULLTEXT mcf_ft_28 (field_28);

ALTER TABLE cms_f_member_custom_fields ADD FULLTEXT mcf_ft_29 (field_29);

ALTER TABLE cms_f_member_custom_fields ADD FULLTEXT mcf_ft_3 (field_3);

ALTER TABLE cms_f_member_custom_fields ADD FULLTEXT mcf_ft_30 (field_30);

ALTER TABLE cms_f_member_custom_fields ADD FULLTEXT mcf_ft_31 (field_31);

ALTER TABLE cms_f_member_custom_fields ADD FULLTEXT mcf_ft_32 (field_32);

ALTER TABLE cms_f_member_custom_fields ADD FULLTEXT mcf_ft_33 (field_33);

ALTER TABLE cms_f_member_custom_fields ADD FULLTEXT mcf_ft_34 (field_34);

ALTER TABLE cms_f_member_custom_fields ADD FULLTEXT mcf_ft_35 (field_35);

ALTER TABLE cms_f_member_custom_fields ADD FULLTEXT mcf_ft_36 (field_36);

ALTER TABLE cms_f_member_custom_fields ADD FULLTEXT mcf_ft_5 (field_5);

ALTER TABLE cms_f_member_custom_fields ADD FULLTEXT mcf_ft_6 (field_6);

ALTER TABLE cms_f_member_custom_fields ADD FULLTEXT mcf_ft_7 (field_7);

ALTER TABLE cms_f_member_custom_fields ADD FULLTEXT mcf_ft_8 (field_8);

ALTER TABLE cms_f_member_custom_fields ADD INDEX mcf1 (field_1(250));

ALTER TABLE cms_f_member_custom_fields ADD INDEX mcf10 (field_10);

ALTER TABLE cms_f_member_custom_fields ADD INDEX mcf11 (field_11);

ALTER TABLE cms_f_member_custom_fields ADD INDEX mcf12 (field_12);

ALTER TABLE cms_f_member_custom_fields ADD INDEX mcf13 (field_13);

ALTER TABLE cms_f_member_custom_fields ADD INDEX mcf14 (field_14);

ALTER TABLE cms_f_member_custom_fields ADD INDEX mcf15 (field_15);

ALTER TABLE cms_f_member_custom_fields ADD INDEX mcf16 (field_16);

ALTER TABLE cms_f_member_custom_fields ADD INDEX mcf2 (field_2(250));

ALTER TABLE cms_f_member_custom_fields ADD INDEX mcf20 (field_20);

ALTER TABLE cms_f_member_custom_fields ADD INDEX mcf25 (field_25(250));

ALTER TABLE cms_f_member_custom_fields ADD INDEX mcf26 (field_26(250));

ALTER TABLE cms_f_member_custom_fields ADD INDEX mcf27 (field_27);

ALTER TABLE cms_f_member_custom_fields ADD INDEX mcf29 (field_29(250));

ALTER TABLE cms_f_member_custom_fields ADD INDEX mcf3 (field_3(250));

ALTER TABLE cms_f_member_custom_fields ADD INDEX mcf30 (field_30(250));

ALTER TABLE cms_f_member_custom_fields ADD INDEX mcf31 (field_31(250));

ALTER TABLE cms_f_member_custom_fields ADD INDEX mcf32 (field_32(250));

ALTER TABLE cms_f_member_custom_fields ADD INDEX mcf34 (field_34(250));

ALTER TABLE cms_f_member_custom_fields ADD INDEX mcf35 (field_35(250));

ALTER TABLE cms_f_member_custom_fields ADD INDEX mcf36 (field_36(250));

ALTER TABLE cms_f_member_custom_fields ADD INDEX mcf4 (field_4(250));

ALTER TABLE cms_f_member_custom_fields ADD INDEX mcf5 (field_5(250));

ALTER TABLE cms_f_member_custom_fields ADD INDEX mcf6 (field_6(250));

ALTER TABLE cms_f_member_custom_fields ADD INDEX mcf7 (field_7(250));

ALTER TABLE cms_f_member_custom_fields ADD INDEX mcf8 (field_8(250));

INSERT INTO cms_f_member_custom_fields (mf_member_id, field_1, field_1__text_parsed, field_1__source_user, field_2, field_2__text_parsed, field_2__source_user, field_3, field_4, field_4__text_parsed, field_4__source_user, field_5, field_6, field_7, field_8, field_9, field_10, field_11, field_12, field_13, field_14, field_15, field_16, field_17, field_18, field_19, field_20, field_21, field_22, field_23, field_24, field_25, field_26, field_27, field_28, field_29, field_30, field_31, field_32, field_33, field_34, field_35, field_36) VALUES (1, '', 'return unserialize(\"a:5:{i:0;a:1:{i:0;a:1:{i:0;a:5:{i:0;s:40:\\\"string_attach_6073c938d23c68.19467884_15\\\";i:1;a:0:{}i:2;i:1;i:3;s:0:\\\"\\\";i:4;s:0:\\\"\\\";}}}i:1;a:0:{}i:2;s:10:\\\":container\\\";i:3;N;i:4;a:1:{s:40:\\\"string_attach_6073c938d23c68.19467884_15\\\";s:69:\\\"\\$tpl_funcs[\'string_attach_6073c938d23c68.19467884_15\']=\\\"echo \\\\\\\"\\\\\\\";\\\";\\n\\\";}}\");
', 1, '', 'return unserialize(\"a:5:{i:0;a:1:{i:0;a:1:{i:0;a:5:{i:0;s:40:\\\"string_attach_6073c938d23c68.19467884_16\\\";i:1;a:0:{}i:2;i:1;i:3;s:0:\\\"\\\";i:4;s:0:\\\"\\\";}}}i:1;a:0:{}i:2;s:10:\\\":container\\\";i:3;N;i:4;a:1:{s:40:\\\"string_attach_6073c938d23c68.19467884_16\\\";s:69:\\\"\\$tpl_funcs[\'string_attach_6073c938d23c68.19467884_16\']=\\\"echo \\\\\\\"\\\\\\\";\\\";\\n\\\";}}\");
', 1, '', '', 'return unserialize(\"a:5:{i:0;a:1:{i:0;a:1:{i:0;a:5:{i:0;s:40:\\\"string_attach_6073c938d23c68.19467884_17\\\";i:1;a:0:{}i:2;i:1;i:3;s:0:\\\"\\\";i:4;s:0:\\\"\\\";}}}i:1;a:0:{}i:2;s:10:\\\":container\\\";i:3;N;i:4;a:1:{s:40:\\\"string_attach_6073c938d23c68.19467884_17\\\";s:69:\\\"\\$tpl_funcs[\'string_attach_6073c938d23c68.19467884_17\']=\\\"echo \\\\\\\"\\\\\\\";\\\";\\n\\\";}}\");
', 1, '', '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', '', NULL, '', '', '', '', '', '', 0, '', '', '', '', '', '', '', '', ''),
(2, '', 'return unserialize(\"a:5:{i:0;a:1:{i:0;a:1:{i:0;a:5:{i:0;s:40:\\\"string_attach_6073c938d23c68.19467884_20\\\";i:1;a:0:{}i:2;i:1;i:3;s:0:\\\"\\\";i:4;s:0:\\\"\\\";}}}i:1;a:0:{}i:2;s:10:\\\":container\\\";i:3;N;i:4;a:1:{s:40:\\\"string_attach_6073c938d23c68.19467884_20\\\";s:69:\\\"\\$tpl_funcs[\'string_attach_6073c938d23c68.19467884_20\']=\\\"echo \\\\\\\"\\\\\\\";\\\";\\n\\\";}}\");
', 1, '', 'return unserialize(\"a:5:{i:0;a:1:{i:0;a:1:{i:0;a:5:{i:0;s:40:\\\"string_attach_6073c938d23c68.19467884_21\\\";i:1;a:0:{}i:2;i:1;i:3;s:0:\\\"\\\";i:4;s:0:\\\"\\\";}}}i:1;a:0:{}i:2;s:10:\\\":container\\\";i:3;N;i:4;a:1:{s:40:\\\"string_attach_6073c938d23c68.19467884_21\\\";s:69:\\\"\\$tpl_funcs[\'string_attach_6073c938d23c68.19467884_21\']=\\\"echo \\\\\\\"\\\\\\\";\\\";\\n\\\";}}\");
', 1, '', '', 'return unserialize(\"a:5:{i:0;a:1:{i:0;a:1:{i:0;a:5:{i:0;s:40:\\\"string_attach_6073c938d23c68.19467884_22\\\";i:1;a:0:{}i:2;i:1;i:3;s:0:\\\"\\\";i:4;s:0:\\\"\\\";}}}i:1;a:0:{}i:2;s:10:\\\":container\\\";i:3;N;i:4;a:1:{s:40:\\\"string_attach_6073c938d23c68.19467884_22\\\";s:69:\\\"\\$tpl_funcs[\'string_attach_6073c938d23c68.19467884_22\']=\\\"echo \\\\\\\"\\\\\\\";\\\";\\n\\\";}}\");
', 1, '', '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', '', NULL, '', '', '', '', '', '', 0, '', '', '', '', '', '', '', '', ''),
(3, '', 'return unserialize(\"a:5:{i:0;a:1:{i:0;a:1:{i:0;a:5:{i:0;s:40:\\\"string_attach_6073c938d23c68.19467884_25\\\";i:1;a:0:{}i:2;i:1;i:3;s:0:\\\"\\\";i:4;s:0:\\\"\\\";}}}i:1;a:0:{}i:2;s:10:\\\":container\\\";i:3;N;i:4;a:1:{s:40:\\\"string_attach_6073c938d23c68.19467884_25\\\";s:69:\\\"\\$tpl_funcs[\'string_attach_6073c938d23c68.19467884_25\']=\\\"echo \\\\\\\"\\\\\\\";\\\";\\n\\\";}}\");
', 1, '', 'return unserialize(\"a:5:{i:0;a:1:{i:0;a:1:{i:0;a:5:{i:0;s:40:\\\"string_attach_6073c938d23c68.19467884_26\\\";i:1;a:0:{}i:2;i:1;i:3;s:0:\\\"\\\";i:4;s:0:\\\"\\\";}}}i:1;a:0:{}i:2;s:10:\\\":container\\\";i:3;N;i:4;a:1:{s:40:\\\"string_attach_6073c938d23c68.19467884_26\\\";s:69:\\\"\\$tpl_funcs[\'string_attach_6073c938d23c68.19467884_26\']=\\\"echo \\\\\\\"\\\\\\\";\\\";\\n\\\";}}\");
', 1, '', '', 'return unserialize(\"a:5:{i:0;a:1:{i:0;a:1:{i:0;a:5:{i:0;s:40:\\\"string_attach_6073c938d23c68.19467884_27\\\";i:1;a:0:{}i:2;i:1;i:3;s:0:\\\"\\\";i:4;s:0:\\\"\\\";}}}i:1;a:0:{}i:2;s:10:\\\":container\\\";i:3;N;i:4;a:1:{s:40:\\\"string_attach_6073c938d23c68.19467884_27\\\";s:69:\\\"\\$tpl_funcs[\'string_attach_6073c938d23c68.19467884_27\']=\\\"echo \\\\\\\"\\\\\\\";\\\";\\n\\\";}}\");
', 1, '', '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', '', NULL, '', '', '', '', '', '', 0, '', '', '', '', '', '', '', '', '');

DROP TABLE IF EXISTS cms_f_member_known_login_ips;

CREATE TABLE cms_f_member_known_login_ips (
    i_ip varchar(40) NOT NULL,
    i_member_id integer NOT NULL,
    i_val_code varchar(255) NOT NULL,
    PRIMARY KEY (i_ip, i_member_id)
) CHARACTER SET=utf8mb4 engine=MyISAM;

DROP TABLE IF EXISTS cms_f_members;

CREATE TABLE cms_f_members (
    m_reveal_age tinyint(1) NOT NULL,
    m_last_submit_time integer unsigned NOT NULL,
    m_email_address varchar(255) NOT NULL,
    m_title varchar(255) NOT NULL,
    m_photo_url varchar(255) BINARY NOT NULL,
    m_photo_thumb_url varchar(255) BINARY NOT NULL,
    m_views_signatures tinyint(1) NOT NULL,
    m_auto_monitor_contrib_content tinyint(1) NOT NULL,
    m_dob_year integer 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 longtext NOT NULL,
    m_max_email_attach_size_mb integer NOT NULL,
    m_password_change_code varchar(255) NOT NULL,
    m_password_compat_scheme varchar(80) NOT NULL,
    m_on_probation_until integer unsigned NULL,
    m_profile_views integer unsigned NOT NULL,
    m_total_sessions integer unsigned NOT NULL,
    m_auto_mark_read tinyint(1) NOT NULL,
    m_dob_day tinyint NULL,
    id integer unsigned auto_increment NOT NULL,
    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) BINARY NOT NULL,
    m_validated tinyint(1) NOT NULL,
    m_validated_email_confirm_code varchar(255) NOT NULL,
    m_cache_num_posts integer NOT NULL,
    m_cache_warnings integer NOT NULL,
    m_join_time integer unsigned NOT NULL,
    m_timezone_offset varchar(255) NOT NULL,
    m_primary_group integer NOT NULL,
    m_last_visit_time integer unsigned NOT NULL,
    m_signature longtext NOT NULL,
    m_is_perm_banned tinyint(1) NOT NULL,
    m_preview_posts tinyint(1) NOT NULL,
    m_dob_month tinyint NULL,
    m_pt_rules_text__text_parsed longtext NOT NULL,
    m_pt_rules_text__source_user integer DEFAULT 1 NOT NULL,
    m_signature__text_parsed longtext NOT NULL,
    m_signature__source_user integer DEFAULT 1 NOT NULL,
    PRIMARY KEY (id)
) CHARACTER SET=utf8mb4 engine=MyISAM;

ALTER TABLE cms_f_members ADD FULLTEXT m_pt_rules_text (m_pt_rules_text);

ALTER TABLE cms_f_members ADD FULLTEXT m_signature (m_signature);

ALTER TABLE cms_f_members ADD FULLTEXT search_user (m_username);

ALTER TABLE cms_f_members ADD INDEX avatar_url (m_avatar_url(250));

ALTER TABLE cms_f_members ADD INDEX birthdays (m_dob_day,m_dob_month);

ALTER TABLE cms_f_members ADD INDEX external_auth_lookup (m_pass_hash_salted(250));

ALTER TABLE cms_f_members ADD INDEX ftjoin_msig (m_signature(250));

ALTER TABLE cms_f_members ADD INDEX last_visit_time (m_dob_month,m_dob_day,m_last_visit_time);

ALTER TABLE cms_f_members ADD INDEX m_join_time (m_join_time);

ALTER TABLE cms_f_members ADD INDEX menail (m_email_address(250));

ALTER TABLE cms_f_members ADD INDEX primary_group (m_primary_group);

ALTER TABLE cms_f_members ADD INDEX sort_post_count (m_cache_num_posts);

ALTER TABLE cms_f_members ADD INDEX user_list (m_username);

ALTER TABLE cms_f_members ADD INDEX whos_validated (m_validated);

INSERT INTO cms_f_members (id, m_username, m_pass_hash_salted, m_pass_salt, m_theme, m_avatar_url, m_validated, m_validated_email_confirm_code, m_cache_num_posts, m_cache_warnings, m_join_time, m_timezone_offset, m_primary_group, m_last_visit_time, m_last_submit_time, m_signature, m_is_perm_banned, m_preview_posts, m_dob_day, m_dob_month, m_dob_year, m_reveal_age, m_email_address, m_title, m_photo_url, m_photo_thumb_url, m_views_signatures, m_auto_monitor_contrib_content, m_language, m_ip_address, m_allow_emails, m_allow_emails_from_staff, m_highlighted_name, m_pt_allow, m_pt_rules_text, m_max_email_attach_size_mb, m_password_change_code, m_password_compat_scheme, m_on_probation_until, m_profile_views, m_total_sessions, m_auto_mark_read, m_signature__text_parsed, m_signature__source_user, m_pt_rules_text__text_parsed, m_pt_rules_text__source_user) VALUES (1, 'Guest', '', '', '', '', 1, '', 0, 0, 1618200890, 'UTC', 1, 1618200890, 1618200890, '', 0, 1, NULL, NULL, NULL, 1, '', '', '', '', 1, 0, '', '127.0.0.1', 1, 1, 0, '*', '', 5, '', 'plain', NULL, 0, 0, 1, 'return unserialize(\"a:5:{i:0;a:1:{i:0;a:1:{i:0;a:5:{i:0;s:40:\\\"string_attach_6073c938d23c68.19467884_13\\\";i:1;a:0:{}i:2;i:1;i:3;s:0:\\\"\\\";i:4;s:0:\\\"\\\";}}}i:1;a:0:{}i:2;s:10:\\\":container\\\";i:3;N;i:4;a:1:{s:40:\\\"string_attach_6073c938d23c68.19467884_13\\\";s:69:\\\"\\$tpl_funcs[\'string_attach_6073c938d23c68.19467884_13\']=\\\"echo \\\\\\\"\\\\\\\";\\\";\\n\\\";}}\");
', 1, 'return unserialize(\"a:5:{i:0;a:1:{i:0;a:1:{i:0;a:5:{i:0;s:40:\\\"string_attach_6073c938d23c68.19467884_14\\\";i:1;a:0:{}i:2;i:1;i:3;s:0:\\\"\\\";i:4;s:0:\\\"\\\";}}}i:1;a:0:{}i:2;s:10:\\\":container\\\";i:3;N;i:4;a:1:{s:40:\\\"string_attach_6073c938d23c68.19467884_14\\\";s:69:\\\"\\$tpl_funcs[\'string_attach_6073c938d23c68.19467884_14\']=\\\"echo \\\\\\\"\\\\\\\";\\\";\\n\\\";}}\");
', 1),
(2, 'admin', '', '', '', 'themes/default/images/cns_default_avatars/default_set/cool_flare.png', 1, '', 0, 0, 1618200890, 'UTC', 2, 1618200890, 1618200890, '', 0, 0, NULL, NULL, NULL, 1, '', '', '', '', 1, 1, '', '127.0.0.1', 1, 1, 0, '*', '', 5, '', 'plain', NULL, 0, 0, 1, 'return unserialize(\"a:5:{i:0;a:1:{i:0;a:1:{i:0;a:5:{i:0;s:40:\\\"string_attach_6073c938d23c68.19467884_18\\\";i:1;a:0:{}i:2;i:1;i:3;s:0:\\\"\\\";i:4;s:0:\\\"\\\";}}}i:1;a:0:{}i:2;s:10:\\\":container\\\";i:3;N;i:4;a:1:{s:40:\\\"string_attach_6073c938d23c68.19467884_18\\\";s:69:\\\"\\$tpl_funcs[\'string_attach_6073c938d23c68.19467884_18\']=\\\"echo \\\\\\\"\\\\\\\";\\\";\\n\\\";}}\");
', 1, 'return unserialize(\"a:5:{i:0;a:1:{i:0;a:1:{i:0;a:5:{i:0;s:40:\\\"string_attach_6073c938d23c68.19467884_19\\\";i:1;a:0:{}i:2;i:1;i:3;s:0:\\\"\\\";i:4;s:0:\\\"\\\";}}}i:1;a:0:{}i:2;s:10:\\\":container\\\";i:3;N;i:4;a:1:{s:40:\\\"string_attach_6073c938d23c68.19467884_19\\\";s:69:\\\"\\$tpl_funcs[\'string_attach_6073c938d23c68.19467884_19\']=\\\"echo \\\\\\\"\\\\\\\";\\\";\\n\\\";}}\");
', 1),
(3, 'test', '', '', '', '', 1, '', 0, 0, 1618200890, 'UTC', 9, 1618200890, 1618200890, '', 0, 0, NULL, NULL, NULL, 1, '', '', '', '', 1, 0, '', '127.0.0.1', 1, 1, 0, '*', '', 5, '', 'plain', NULL, 0, 0, 1, 'return unserialize(\"a:5:{i:0;a:1:{i:0;a:1:{i:0;a:5:{i:0;s:40:\\\"string_attach_6073c938d23c68.19467884_23\\\";i:1;a:0:{}i:2;i:1;i:3;s:0:\\\"\\\";i:4;s:0:\\\"\\\";}}}i:1;a:0:{}i:2;s:10:\\\":container\\\";i:3;N;i:4;a:1:{s:40:\\\"string_attach_6073c938d23c68.19467884_23\\\";s:69:\\\"\\$tpl_funcs[\'string_attach_6073c938d23c68.19467884_23\']=\\\"echo \\\\\\\"\\\\\\\";\\\";\\n\\\";}}\");
', 1, 'return unserialize(\"a:5:{i:0;a:1:{i:0;a:1:{i:0;a:5:{i:0;s:40:\\\"string_attach_6073c938d23c68.19467884_24\\\";i:1;a:0:{}i:2;i:1;i:3;s:0:\\\"\\\";i:4;s:0:\\\"\\\";}}}i:1;a:0:{}i:2;s:10:\\\":container\\\";i:3;N;i:4;a:1:{s:40:\\\"string_attach_6073c938d23c68.19467884_24\\\";s:69:\\\"\\$tpl_funcs[\'string_attach_6073c938d23c68.19467884_24\']=\\\"echo \\\\\\\"\\\\\\\";\\\";\\n\\\";}}\");
', 1);

DROP TABLE IF EXISTS cms_f_moderator_logs;

CREATE TABLE cms_f_moderator_logs (
    l_param_a varchar(255) NOT NULL,
    l_by integer NOT NULL,
    l_reason longtext NOT NULL,
    l_date_and_time integer unsigned NOT NULL,
    l_param_b varchar(255) NOT NULL,
    l_the_type varchar(80) NOT NULL,
    id integer unsigned auto_increment NOT NULL,
    PRIMARY KEY (id)
) CHARACTER SET=utf8mb4 engine=MyISAM;

DROP TABLE IF EXISTS cms_f_multi_moderations;

CREATE TABLE cms_f_multi_moderations (
    mm_title_suffix varchar(255) NOT NULL,
    mm_forum_multi_code varchar(255) NOT NULL,
    mm_open_state tinyint(1) NULL,
    mm_sink_state tinyint(1) NULL,
    mm_pin_state tinyint(1) NULL,
    mm_move_to integer NULL,
    mm_post_text longtext NOT NULL,
    mm_name longtext NOT NULL,
    id integer unsigned auto_increment NOT NULL,
    PRIMARY KEY (id)
) CHARACTER SET=utf8mb4 engine=MyISAM;

ALTER TABLE cms_f_multi_moderations ADD FULLTEXT mm_name (mm_name);

INSERT INTO cms_f_multi_moderations (id, mm_name, mm_post_text, mm_move_to, mm_pin_state, mm_sink_state, mm_open_state, mm_forum_multi_code, mm_title_suffix) VALUES (1, 'Trash', '', 4, 0, 0, 0, '*', '');

DROP TABLE IF EXISTS cms_f_password_history;

CREATE TABLE cms_f_password_history (
    id integer unsigned auto_increment NOT NULL,
    p_salt varchar(255) NOT NULL,
    p_hash_salted varchar(255) NOT NULL,
    p_member_id integer NOT NULL,
    p_time integer unsigned NOT NULL,
    PRIMARY KEY (id)
) CHARACTER SET=utf8mb4 engine=MyISAM;

ALTER TABLE cms_f_password_history ADD INDEX p_member_id (p_member_id);

DROP TABLE IF EXISTS cms_f_poll_answers;

CREATE TABLE cms_f_poll_answers (
    id integer unsigned auto_increment NOT NULL,
    pa_poll_id integer NOT NULL,
    pa_answer varchar(255) NOT NULL,
    pa_cache_num_votes integer NOT NULL,
    PRIMARY KEY (id)
) CHARACTER SET=utf8mb4 engine=MyISAM;

DROP TABLE IF EXISTS cms_f_poll_votes;

CREATE TABLE cms_f_poll_votes (
    id integer unsigned auto_increment NOT NULL,
    pv_poll_id integer NOT NULL,
    pv_member_id integer NOT NULL,
    pv_answer_id integer NOT NULL,
    pv_ip varchar(40) NOT NULL,
    PRIMARY KEY (id)
) CHARACTER SET=utf8mb4 engine=MyISAM;

