Title: SQL error on upgrade
Last modified: November 28, 2017

---

# SQL error on upgrade

 *  Resolved [gresakg](https://wordpress.org/support/users/gresakg/)
 * (@gresakg)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/sql-error-on-upgrade/)
 * While upgrading to the latest version, I got the following sql error in my error.
   log:
 * >  Foreign key constraint is incorrectly formed”) for the query CREATE TABLE `
   > wp_cfs_membership_presets` (
   >  `form_id` int(11) NOT NULL, `allow_use` TINYINT(
   > 1) NOT NULL DEFAULT 0, PRIMARY KEY (`form_id`), FOREIGN KEY `fk_membership_presets_forms_id`(`
   > form_id`) REFERENCES `wp_cfs_forms`(`id`) ON DELETE CASCADE ) DEFAULT CHARSET
   > =utf8
 * Also, the db table cfs_membership_presets is not created.
    Plugin version 1.3.4
   DB version 5.5.5-10.1.29-MariaDB-1
    -  This topic was modified 8 years, 6 months ago by [gresakg](https://wordpress.org/support/users/gresakg/).

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

 *  Plugin Author [supsystic](https://wordpress.org/support/users/supsysticcom/)
 * (@supsysticcom)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/sql-error-on-upgrade/#post-9729208)
 * Hi [@gresakg](https://wordpress.org/support/users/gresakg/)
 * Thank you for contacting us about this plugin question.
 * cfs_membership_presets – this table exists in order to cooperate with other our
   plugin Membership. So if you don’t need it now, there is nothing to worry about.
 * About sql error, your issue was redirected to our developer and he will try to
   fix it any time soon. I will inform you about the progress
 *  Plugin Author [supsystic](https://wordpress.org/support/users/supsysticcom/)
 * (@supsysticcom)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/sql-error-on-upgrade/#post-9730838)
 * Hello [@gresakg](https://wordpress.org/support/users/gresakg/)
    We are glad to
   tell you that we just released new version – just for you, with fix for your 
   database setup, where you will not see this error anymore. As I said before –
   it didn’t influence for core work of plugin, it just didn’t created one table
   in database – required for cooperation with our Membership plugin – [https://wordpress.org/plugins/membership-by-supsystic/](https://wordpress.org/plugins/membership-by-supsystic/),
   but it should work for all of our users, right?:) So, fix is released, all you
   need to do – is update plugin. Thank you for choosing our solutions!
    -  This reply was modified 8 years, 6 months ago by [supsystic](https://wordpress.org/support/users/supsysticcom/).
 *  Thread Starter [gresakg](https://wordpress.org/support/users/gresakg/)
 * (@gresakg)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/sql-error-on-upgrade/#post-9730869)
 * Thank you very much!
    I just did the upgrade and it worked. Your support is really
   great! Thank you for sharing your solutions!

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

The topic ‘SQL error on upgrade’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-by-supsystic/assets/icon-256x256.png?rev=1422396)
 * [Contact Form by Supsystic](https://wordpress.org/plugins/contact-form-by-supsystic/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-by-supsystic/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-by-supsystic/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-by-supsystic/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-by-supsystic/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-by-supsystic/reviews/)

## Tags

 * [MySQL](https://wordpress.org/support/topic-tag/mysql/)
 * [upgrade](https://wordpress.org/support/topic-tag/upgrade/)

 * 3 replies
 * 2 participants
 * Last reply from: [gresakg](https://wordpress.org/support/users/gresakg/)
 * Last activity: [8 years, 6 months ago](https://wordpress.org/support/topic/sql-error-on-upgrade/#post-9730869)
 * Status: resolved