Title: WordPress database error
Last modified: December 12, 2018

---

# WordPress database error

 *  Resolved [SimplyMarkB](https://wordpress.org/support/users/smartguyus/)
 * (@smartguyus)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/wordpress-database-error-130/)
 * After installation and activation, On the admin page for the plugin I am seeing
   this message above the settings tab:
 * WordPress database error: [Table ‘www3ideal.wp_object_sync_sf_object_map’ doesn’t
   exist]
    SELECT * FROM wp_object_sync_sf_object_map WHERE salesforce_id LIKE “
   tmp_sf_%”
 * WordPress database error: [Table ‘www3ideal.wp_object_sync_sf_object_map’ doesn’t
   exist]
    SELECT * FROM wp_object_sync_sf_object_map WHERE wordpress_id LIKE “tmp_wp_%”

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [Jonathan Stegall](https://wordpress.org/support/users/jonathanstegall/)
 * (@jonathanstegall)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/wordpress-database-error-130/#post-10979476)
 * [@smartguyus](https://wordpress.org/support/users/smartguyus/) in some server
   environments, when the plugin activates it is unable to create the required database
   tables. I’m not sure why this is, as I haven’t been able to figure out which 
   environments have this issue.
 * But in any case, you can try to create the tables manually and see if that works.
   Here’s the SQL for them:
 * CREATE TABLE `wp_object_sync_sf_field_map` (
    `id` bigint(20) unsigned NOT NULL
   AUTO_INCREMENT, `label` varchar(64) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT”,`
   name` varchar(64) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT ”, `wordpress_object`
   varchar(128) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT ”, `salesforce_object`
   varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT ”, `salesforce_record_types_allowed`
   longblob, `salesforce_record_type_default` varchar(255) COLLATE utf8mb4_unicode_520_ci
   NOT NULL DEFAULT ”, `fields` longtext COLLATE utf8mb4_unicode_520_ci NOT NULL,`
   pull_trigger_field` varchar(128) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT‘
   LastModifiedDate’, `sync_triggers` text COLLATE utf8mb4_unicode_520_ci NOT NULL,`
   push_async` tinyint(1) NOT NULL DEFAULT ‘0’, `push_drafts` tinyint(1) NOT NULL
   DEFAULT ‘0’, `weight` tinyint(1) NOT NULL DEFAULT ‘0’, `version` varchar(255)
   COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT ”, `pull_to_drafts` tinyint(1)
   NOT NULL DEFAULT ‘0’, PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`), KEY `name_sf_type_wordpress_type`(`
   wordpress_object`,`salesforce_object`(191)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
   COLLATE=utf8mb4_unicode_520_ci;
 * CREATE TABLE `wp_object_sync_sf_object_map` (
    `id` bigint(20) unsigned NOT NULL
   AUTO_INCREMENT, `wordpress_id` varchar(32) COLLATE utf8mb4_unicode_520_ci NOT
   NULL, `salesforce_id` varbinary(32) NOT NULL DEFAULT ”, `wordpress_object` varchar(
   128) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT ”, `created` datetime NOT
   NULL DEFAULT CURRENT_TIMESTAMP, `object_updated` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,`
   last_sync` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `last_sync_action` varchar(
   128) COLLATE utf8mb4_unicode_520_ci DEFAULT NULL, `last_sync_status` tinyint(
   1) NOT NULL DEFAULT ‘0’, `last_sync_message` varchar(255) COLLATE utf8mb4_unicode_520_ci
   DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `salesforce` (`salesforce_id`), 
   UNIQUE KEY `salesforce_wordpress` (`wordpress_object`,`wordpress_id`), KEY `wordpress_object`(`
   wordpress_object`,`wordpress_id`), KEY `salesforce_object` (`salesforce_id`) )
   ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
 * It’s possible you’ll need to reactivate the plugin after doing this.
 *  [Sebastien SERRE](https://wordpress.org/support/users/sebastienserre/)
 * (@sebastienserre)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/wordpress-database-error-130/#post-11394444)
 * Hello,
    the `CREATE TABLE`wp_object_sync_sf_field_map` ( `id` bigint(20) unsigned
   NOT NULL AUTO_INCREMENT, `label` varchar(64) COLLATE utf8mb4_unicode_520_ci NOT
   NULL DEFAULT ”, `name` varchar(64) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT”,`
   wordpress_object` varchar(128) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT”,`
   salesforce_object` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT”,`
   salesforce_record_types_allowed` longblob, `salesforce_record_type_default` varchar(
   255) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT ”, `fields` longtext COLLATE
   utf8mb4_unicode_520_ci NOT NULL, `pull_trigger_field` varchar(128) COLLATE utf8mb4_unicode_520_ci
   NOT NULL DEFAULT ‘LastModifiedDate’, `sync_triggers` text COLLATE utf8mb4_unicode_520_ci
   NOT NULL, `push_async` tinyint(1) NOT NULL DEFAULT ‘0’, `push_drafts` tinyint(
   1) NOT NULL DEFAULT ‘0’, `pull_to_drafts` tinyint(1) NOT NULL DEFAULT ‘0’, `weight`
   tinyint(1) NOT NULL DEFAULT ‘0’, `version` varchar(255) COLLATE utf8mb4_unicode_520_ci
   NOT NULL DEFAULT ”, PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`), KEY `name_sf_type_wordpress_type`(`
   wordpress_object`,`salesforce_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
   COLLATE=utf8mb4_unicode_520_ci;` give me the error: `#1709 - Index column size
   too large. The maximum column size is 767 bytes.`
 * Any idea to solved?
 *  Plugin Author [Jonathan Stegall](https://wordpress.org/support/users/jonathanstegall/)
 * (@jonathanstegall)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/wordpress-database-error-130/#post-11395927)
 * [@sebastienserre](https://wordpress.org/support/users/sebastienserre/) I do not
   know how to solve that. What version of PHP and MySQL are you using, and who 
   is your host?
 *  [Sebastien SERRE](https://wordpress.org/support/users/sebastienserre/)
 * (@sebastienserre)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/wordpress-database-error-130/#post-11395937)
 * Sorry,
    [https://stackoverflow.com/questions/30761867/mysql-error-the-maximum-column-size-is-767-bytes](https://stackoverflow.com/questions/30761867/mysql-error-the-maximum-column-size-is-767-bytes)
   should solve. I didn’t test on my mutualized hoster.
 * I’ve migrated to another dedicated server…. where I didn’t reproduced…
 *  Plugin Author [Jonathan Stegall](https://wordpress.org/support/users/jonathanstegall/)
 * (@jonathanstegall)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/wordpress-database-error-130/#post-11395962)
 * [@sebastienserre](https://wordpress.org/support/users/sebastienserre/) I don’t
   think we’re likely to add this into the plugin. From everything I’ve been able
   to find, it appears to be an issue on older MySQL versions, and it’s unlikely
   that we can devote much energy to supporting that.
 * However if there’s a pull request someone submits that fixes the issue without
   harming more current versions of MySQL, I’d be happy to look at it.
 *  [Sebastien SERRE](https://wordpress.org/support/users/sebastienserre/)
 * (@sebastienserre)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/wordpress-database-error-130/#post-11395975)
 * I understand, no problem.
    I will push a PR if i ‘ll find a solution 😉
 *  [pkoceniak](https://wordpress.org/support/users/pkoceniak/)
 * (@pkoceniak)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/wordpress-database-error-130/#post-11612724)
 * I had the same problem on MySQL 5.5
 * I switched the created, object_updated, and last_sync columns to the following:
 *     ```
       $object_map_sql   = "CREATE TABLE $object_map_table (
                   id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
                   wordpress_id varchar(32) NOT NULL,
                   salesforce_id varbinary(32) NOT NULL DEFAULT '',
                   wordpress_object varchar(128) NOT NULL DEFAULT '',
                   created timestamp NULL,
                   object_updated timestamp NULL,
                   last_sync timestamp NULL,
                   last_sync_action varchar(128) DEFAULT NULL,
                   last_sync_status tinyint(1) NOT NULL DEFAULT '0',
                   last_sync_message varchar(255) DEFAULT NULL,
                   PRIMARY KEY  (id),
                   KEY wordpress_object (wordpress_object,wordpress_id),
                   KEY salesforce_object (salesforce_id)
               ) $charset_collate";
       ```
   
 * Source: [https://stackoverflow.com/questions/4851672/one-mysql-table-with-multiple-timestamp-columns](https://stackoverflow.com/questions/4851672/one-mysql-table-with-multiple-timestamp-columns)

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘WordPress database error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/object-sync-for-salesforce.svg)
 * [Object Sync for Salesforce](https://wordpress.org/plugins/object-sync-for-salesforce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/object-sync-for-salesforce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/object-sync-for-salesforce/)
 * [Active Topics](https://wordpress.org/support/plugin/object-sync-for-salesforce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/object-sync-for-salesforce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/object-sync-for-salesforce/reviews/)

 * 7 replies
 * 4 participants
 * Last reply from: [pkoceniak](https://wordpress.org/support/users/pkoceniak/)
 * Last activity: [6 years, 11 months ago](https://wordpress.org/support/topic/wordpress-database-error-130/#post-11612724)
 * Status: resolved