Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cheesman225/32257c416c2805f2a7e27781b73adc1f to your computer and use it in GitHub Desktop.
Save cheesman225/32257c416c2805f2a7e27781b73adc1f to your computer and use it in GitHub Desktop.
SQL code for creating the tables needed by Search and Filter Pro since they can't be created on Pantheon and having the plugin create them on localhost does so in the wrong encoding.
--
-- Table structure for table `wp_search_filter_cache`
--
DROP TABLE IF EXISTS `wp_search_filter_cache`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `wp_search_filter_cache` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`post_id` bigint(20) NOT NULL,
`post_parent_id` bigint(20) NOT NULL,
`field_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`field_value` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`field_value_num` bigint(20) DEFAULT NULL,
`field_parent_num` bigint(20) DEFAULT NULL,
`term_parent_id` bigint(20) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `field_name_index` (`field_name`),
KEY `field_value_index` (`field_value`),
KEY `field_value_num_index` (`field_value_num`)
) ENGINE=InnoDB AUTO_INCREMENT=52808 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `wp_search_filter_cache`
--
LOCK TABLES `wp_search_filter_cache` WRITE;
/*!40000 ALTER TABLE `wp_search_filter_cache` DISABLE KEYS */;
/*!40000 ALTER TABLE `wp_search_filter_cache` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `wp_search_filter_term_results`
--
DROP TABLE IF EXISTS `wp_search_filter_term_results`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `wp_search_filter_term_results` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`field_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`field_value` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`field_value_num` bigint(20) DEFAULT NULL,
`result_ids` mediumtext COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`),
KEY `field_name_index` (`field_name`),
KEY `field_value_index` (`field_value`),
KEY `field_value_num_index` (`field_value`)
) ENGINE=InnoDB AUTO_INCREMENT=10886 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `wp_search_filter_term_results`
--
LOCK TABLES `wp_search_filter_term_results` WRITE;
/*!40000 ALTER TABLE `wp_search_filter_term_results` DISABLE KEYS */;
/*!40000 ALTER TABLE `wp_search_filter_term_results` ENABLE KEYS */;
UNLOCK TABLES;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment