Can’t create table `{my_db_name}`.`wp_icwp_wpsf_scanitems` (errno: 150…)
-
Hi there,
After the last updates, on a website of mine I’m having a big warning “Shield Security Databases May Need To Be Repaired”.
If I click to repair the database, tables are actually deleted and recreated, however the message keep appearing.
I’ve tried to manually delete some table too as mentioned here: https://www.ads-software.com/support/topic/foreign-key-constraint-fails-woocommerce/
However, I keep getting the message.
Then I’ve noticed this error in php log, where basically the plugin fails creating the {wp_prefix}_icwp_wpsf_scanitems table for some reason:
Can't create table '{my_db_name}'.'wp_icwp_wpsf_scanitems' (errno: 150 "Foreign key constraint is incorrectly formed") per la query CREATE TABLE 'wp_icwp_wpsf_scanitems' ( id int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Primary ID', scan_ref int(11) UNSIGNED NOT NULL COMMENT 'Foreign Key For Primary ID', items text COMMENT 'Array of scan items', started_at int(15) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Started Scanning Items At', finished_at int(15) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Finished Scanning Items At', PRIMARY KEY (id), FOREIGN KEY (scan_ref) REFERENCES wp_icwp_wpsf_scans(id) ON DELETE CASCADE ON UPDATE CASCADE ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; fatta da require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('plugins_loaded'), WP_Hook->do_action, WP_Hook->apply_filters, icwp_wpsf_init, require_once('/plugins/wp-simple-firewall/init.php'), ICWP_WPSF_Shield_Security->start, FernleafSystems\Wordpress\Plugin\Shield\Controller\Controller->boot, FernleafSystems\Wordpress\Plugin\Shield\Controller\Controller->loadModules, FernleafSystems\Wordpress\Plugin\Shield\Controller\Checks\PreModulesBootCheck->run, FernleafSystems\Wordpress\Plugin\Shield\Modules\Base\Databases->loadAllDbHandlers, FernleafSystems\Wordpress\Plugin\Shield\Modules\Base\Databases->loadDbH, FernleafSystems\Wordpress\Plugin\Core\Databases\Base\Handler->execute, FernleafSystems\Wordpress\Plugin\Core\Databases\Base\Handler->run, FernleafSystems\Wordpress\Plugin\Core\Databases\Base\Handler->tableInit, FernleafSystems\Wordpress\Plugin\Core\Databases\Common\AlignTableWithSchema->align, FernleafSystems\Wordpress\Services\Core\Db->doSql
All plugins are up to date
The plugin was working fine last time I checked (like one week ago)
- The topic ‘Can’t create table `{my_db_name}`.`wp_icwp_wpsf_scanitems` (errno: 150…)’ is closed to new replies.