text: SET NAMES 'utf8';
  DROP TABLE IF EXISTS `caches`;
  CREATE TABLE `caches` (
    `cache_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    `uuid` varchar(36) NOT NULL,
    `node` tinyint(3) unsigned NOT NULL DEFAULT '0',
    `date_created` datetime NOT NULL COMMENT 'via Trigger (caches)',
    `is_publishdate` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1 = date_created is publication date',
    `last_modified` datetime NOT NULL COMMENT 'via Trigger (caches)',
    `listing_last_modified` datetime NOT NULL COMMENT 'via Trigger (caches, cache_desc, coordinates, pictures)',
    `meta_last_modified` datetime NOT NULL COMMENT 'via Trigger (stat_caches, gk_item_waypoint)',
    `user_id` int(10) unsigned NOT NULL,
    `name` varchar(255) NOT NULL,
    `longitude` double NOT NULL,
    `latitude` double NOT NULL,
    `type` tinyint(3) unsigned NOT NULL,
    `status` tinyint(3) unsigned NOT NULL,
    `country` char(2) NOT NULL,
    `date_hidden` date NOT NULL,
    `size` tinyint(3) unsigned NOT NULL,
    `difficulty` tinyint(3) unsigned NOT NULL,
    `terrain` tinyint(3) unsigned NOT NULL,
    `logpw` varchar(20) DEFAULT NULL,
    `search_time` float unsigned NOT NULL DEFAULT '0',
    `way_length` float unsigned NOT NULL DEFAULT '0',
    `wp_gc` varchar(7) NOT NULL,
    `wp_gc_maintained` varchar(7) NOT NULL,
    `wp_nc` varchar(6) NOT NULL COMMENT 'obsolete',
    `wp_oc` varchar(7) NOT NULL,
    `desc_languages` varchar(60) NOT NULL COMMENT 'via Trigger (cache_desc)',
    `default_desclang` char(2) NOT NULL,
    `date_activate` datetime DEFAULT NULL,
    `need_npa_recalc` tinyint(1) NOT NULL,
    `show_cachelists` tinyint(1) NOT NULL DEFAULT '1',
    `protect_old_coords` tinyint(1) NOT NULL DEFAULT '0',
    `needs_maintenance` tinyint(1) NOT NULL DEFAULT '0',
    `listing_outdated` tinyint(1) NOT NULL DEFAULT '0',
    `flags_last_modified` datetime NOT NULL COMMENT 'via Trigger (caches)',
    PRIMARY KEY (`cache_id`),
    UNIQUE KEY `uuid` (`uuid`),
    UNIQUE KEY `wp_oc` (`wp_oc`),
    KEY `longitude` (`longitude`,`latitude`),
    KEY `date_created` (`date_created`),
    KEY `latitude` (`latitude`),
    KEY `country` (`country`),
    KEY `status` (`status`,`date_activate`),
    KEY `last_modified` (`last_modified`),
    KEY `wp_gc` (`wp_gc`),
    KEY `user_id` (`user_id`),
    KEY `date_activate` (`date_activate`),
    KEY `need_npa_recalc` (`need_npa_recalc`),
    KEY `type` (`type`),
    KEY `size` (`size`),
    KEY `difficulty` (`difficulty`),
    KEY `terrain` (`terrain`),
    KEY `wp_gc_maintained` (`wp_gc_maintained`),
    KEY `date_hidden` (`date_hidden`)
  ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 ;
  