skip to Main Content

I received a message from the hosting provider that my site will be shut down because of server overloading. When I investigated the issue I found that error which is logged in the errors log on the server:

[26-May-2021 11:20:11 UTC] WordPress database error Table ‘threec719_sim.wp_actionscheduler_logs’ doesn’t exist for query SHOW FULL COLUMNS FROM wp_actionscheduler_logs made by do_action(‘wp_ajax_as_async_request_queue_runner’), WP_Hook->do_action, WP_Hook->apply_filters, WP_Async_Request->maybe_handle, ActionScheduler_AsyncRequest_QueueRunner->handle, do_action(‘action_scheduler_run_queue’), WP_Hook->do_action, WP_Hook->apply_filters, ActionScheduler_QueueRunner->run, ActionScheduler_QueueRunner->do_batch, ActionScheduler_Abstract_QueueRunner->process_action, do_action(‘action_scheduler_execution_ignored’), WP_Hook->do_action, WP_Hook->apply_filters, ActionScheduler_Logger->log_ignored_action, ActionScheduler_DBLogger->log

The log file grows with a megabyte of strings each second.

I disabled all other plugins and narrowed the issue to the woocommerce plugin alone, probably after an automatic update that issue occured. Tried with older versions – no luck.

2

Answers


  1. Note: Please make a backup of the database first.

    This happened when you upgrade WordPress.

    I had a local version with the right tables in the database. I have copied manually the tables and the problem disappeared.

    This is the SQL…hope can help you:

    CREATE TABLE IF NOT EXISTS wp_wc_admin_notes (
    note_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    name varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    type varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
    locale varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
    title longtext COLLATE utf8mb4_unicode_ci NOT NULL,
    content longtext COLLATE utf8mb4_unicode_ci NOT NULL,
    icon varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
    content_data longtext COLLATE utf8mb4_unicode_ci,
    status varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
    source varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
    date_created datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
    date_reminder datetime DEFAULT NULL,
    is_snoozable tinyint(1) NOT NULL DEFAULT ‘0’,
    PRIMARY KEY (note_id)
    ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    
    CREATE TABLE IF NOT EXISTS wp_wc_admin_note_actions (
    action_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    note_id bigint(20) unsigned NOT NULL,
    name varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    label varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    query longtext COLLATE utf8mb4_unicode_ci NOT NULL,
    status varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    is_primary tinyint(1) NOT NULL DEFAULT ‘0’,
    PRIMARY KEY (action_id),
    KEY note_id (note_id)
    ) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    
    CREATE TABLE IF NOT EXISTS wp_wc_category_lookup (
    category_tree_id bigint(20) unsigned NOT NULL,
    category_id bigint(20) unsigned NOT NULL,
    PRIMARY KEY (category_tree_id,category_id)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    
    CREATE TABLE IF NOT EXISTS wp_wc_customer_lookup (
    customer_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    user_id bigint(20) unsigned DEFAULT NULL,
    username varchar(60) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
    first_name varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    last_name varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    email varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    date_last_active timestamp NULL DEFAULT NULL,
    date_registered timestamp NULL DEFAULT NULL,
    country char(2) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
    postcode varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
    city varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
    state varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
    PRIMARY KEY (customer_id),
    UNIQUE KEY user_id (user_id),
    KEY email (email)
    ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    
    CREATE TABLE IF NOT EXISTS wp_wc_download_log (
    download_log_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    timestamp datetime NOT NULL,
    permission_id bigint(20) unsigned NOT NULL,
    user_id bigint(20) unsigned DEFAULT NULL,
    user_ip_address varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT ”,
    PRIMARY KEY (download_log_id),
    KEY permission_id (permission_id),
    KEY timestamp (timestamp),
    CONSTRAINT fk_wp_wc_download_log_permission_id FOREIGN KEY (permission_id) REFERENCES wp_woocommerce_downloadable_product_permissions (permission_id) ON DELETE CASCADE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    
    CREATE TABLE IF NOT EXISTS wp_wc_order_coupon_lookup (
    order_id bigint(20) unsigned NOT NULL,
    coupon_id bigint(20) unsigned NOT NULL,
    date_created datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
    discount_amount double NOT NULL DEFAULT ‘0’,
    PRIMARY KEY (order_id,coupon_id),
    KEY coupon_id (coupon_id),
    KEY date_created (date_created)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    
    CREATE TABLE IF NOT EXISTS wp_wc_order_product_lookup (
    order_item_id bigint(20) unsigned NOT NULL,
    order_id bigint(20) unsigned NOT NULL,
    product_id bigint(20) unsigned NOT NULL,
    variation_id bigint(20) unsigned NOT NULL,
    customer_id bigint(20) unsigned DEFAULT NULL,
    date_created datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
    product_qty int(11) NOT NULL,
    product_net_revenue double NOT NULL DEFAULT ‘0’,
    product_gross_revenue double NOT NULL DEFAULT ‘0’,
    coupon_amount double NOT NULL DEFAULT ‘0’,
    tax_amount double NOT NULL DEFAULT ‘0’,
    shipping_amount double NOT NULL DEFAULT ‘0’,
    shipping_tax_amount double NOT NULL DEFAULT ‘0’,
    PRIMARY KEY (order_item_id),
    KEY order_id (order_id),
    KEY product_id (product_id),
    KEY customer_id (customer_id),
    KEY date_created (date_created)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    
    CREATE TABLE IF NOT EXISTS wp_wc_order_stats (
    order_id bigint(20) unsigned NOT NULL,
    parent_id bigint(20) unsigned NOT NULL DEFAULT ‘0’,
    date_created datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
    date_created_gmt datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
    num_items_sold int(11) NOT NULL DEFAULT ‘0’,
    total_sales double NOT NULL DEFAULT ‘0’,
    tax_total double NOT NULL DEFAULT ‘0’,
    shipping_total double NOT NULL DEFAULT ‘0’,
    net_total double NOT NULL DEFAULT ‘0’,
    returning_customer tinyint(1) DEFAULT NULL,
    status varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
    customer_id bigint(20) unsigned NOT NULL,
    PRIMARY KEY (order_id),
    KEY date_created (date_created),
    KEY customer_id (customer_id),
    KEY status (status(191))
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    
    CREATE TABLE IF NOT EXISTS wp_wc_order_tax_lookup (
    order_id bigint(20) unsigned NOT NULL,
    tax_rate_id bigint(20) unsigned NOT NULL,
    date_created datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
    shipping_tax double NOT NULL DEFAULT ‘0’,
    order_tax double NOT NULL DEFAULT ‘0’,
    total_tax double NOT NULL DEFAULT ‘0’,
    PRIMARY KEY (order_id,tax_rate_id),
    KEY tax_rate_id (tax_rate_id),
    KEY date_created (date_created)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    
    CREATE TABLE IF NOT EXISTS wp_wc_product_meta_lookup (
    product_id bigint(20) NOT NULL,
    sku varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT ”,
    virtual tinyint(1) DEFAULT ‘0’,
    downloadable tinyint(1) DEFAULT ‘0’,
    min_price decimal(19,4) DEFAULT NULL,
    max_price decimal(19,4) DEFAULT NULL,
    onsale tinyint(1) DEFAULT ‘0’,
    stock_quantity double DEFAULT NULL,
    stock_status varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT ‘instock’,
    rating_count bigint(20) DEFAULT ‘0’,
    average_rating decimal(3,2) DEFAULT ‘0.00’,
    total_sales bigint(20) DEFAULT ‘0’,
    tax_status varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT ‘taxable’,
    tax_class varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT ”,
    PRIMARY KEY (product_id),
    KEY virtual (virtual),
    KEY downloadable (downloadable),
    KEY stock_status (stock_status),
    KEY stock_quantity (stock_quantity),
    KEY onsale (onsale),
    KEY min_max_price (min_price,max_price)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    
    CREATE TABLE IF NOT EXISTS wp_wc_tax_rate_classes (
    tax_rate_class_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    name varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
    slug varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
    PRIMARY KEY (tax_rate_class_id),
    UNIQUE KEY slug (slug(191))
    ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    
    CREATE TABLE IF NOT EXISTS wp_wc_webhooks (
    webhook_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    status varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
    name text COLLATE utf8mb4_unicode_ci NOT NULL,
    user_id bigint(20) unsigned NOT NULL,
    delivery_url text COLLATE utf8mb4_unicode_ci NOT NULL,
    secret text COLLATE utf8mb4_unicode_ci NOT NULL,
    topic varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
    date_created datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
    date_created_gmt datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
    date_modified datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
    date_modified_gmt datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
    api_version smallint(4) NOT NULL,
    failure_count smallint(10) NOT NULL DEFAULT ‘0’,
    pending_delivery tinyint(1) NOT NULL DEFAULT ‘0’,
    PRIMARY KEY (webhook_id),
    KEY user_id (user_id)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    
    CREATE TABLE IF NOT EXISTS wp_woocommerce_api_keys (
    key_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    user_id bigint(20) unsigned NOT NULL,
    description varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    permissions varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL,
    consumer_key char(64) COLLATE utf8mb4_unicode_ci NOT NULL,
    consumer_secret char(43) COLLATE utf8mb4_unicode_ci NOT NULL,
    nonces longtext COLLATE utf8mb4_unicode_ci,
    truncated_key char(7) COLLATE utf8mb4_unicode_ci NOT NULL,
    last_access datetime DEFAULT NULL,
    PRIMARY KEY (key_id),
    KEY consumer_key (consumer_key),
    KEY consumer_secret (consumer_secret)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    
    CREATE TABLE IF NOT EXISTS wp_woocommerce_attribute_taxonomies (
    attribute_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    attribute_name varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
    attribute_label varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    attribute_type varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
    attribute_orderby varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
    attribute_public int(1) NOT NULL DEFAULT ‘1’,
    PRIMARY KEY (attribute_id),
    KEY attribute_name (attribute_name(20))
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    
    CREATE TABLE IF NOT EXISTS wp_woocommerce_downloadable_product_permissions (
    permission_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    download_id varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL,
    product_id bigint(20) unsigned NOT NULL,
    order_id bigint(20) unsigned NOT NULL DEFAULT ‘0’,
    order_key varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
    user_email varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
    user_id bigint(20) unsigned DEFAULT NULL,
    downloads_remaining varchar(9) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    access_granted datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
    access_expires datetime DEFAULT NULL,
    download_count bigint(20) unsigned NOT NULL DEFAULT ‘0’,
    PRIMARY KEY (permission_id),
    KEY download_order_key_product (product_id,order_id,order_key(16),download_id),
    KEY download_order_product (download_id,order_id,product_id),
    KEY order_id (order_id),
    KEY user_order_remaining_expires (user_id,order_id,downloads_remaining,access_expires)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    
    CREATE TABLE IF NOT EXISTS wp_woocommerce_log (
    log_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    timestamp datetime NOT NULL,
    level smallint(4) NOT NULL,
    source varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
    message longtext COLLATE utf8mb4_unicode_ci NOT NULL,
    context longtext COLLATE utf8mb4_unicode_ci,
    PRIMARY KEY (log_id),
    KEY level (level)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    
    CREATE TABLE IF NOT EXISTS wp_woocommerce_order_itemmeta (
    meta_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    order_item_id bigint(20) unsigned NOT NULL,
    meta_key varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    meta_value longtext COLLATE utf8mb4_unicode_ci,
    PRIMARY KEY (meta_id),
    KEY order_item_id (order_item_id),
    KEY meta_key (meta_key(32))
    ) ENGINE=InnoDB AUTO_INCREMENT=68 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    
    CREATE TABLE IF NOT EXISTS wp_woocommerce_order_items (
    order_item_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    order_item_name text COLLATE utf8mb4_unicode_ci NOT NULL,
    order_item_type varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
    order_id bigint(20) unsigned NOT NULL,
    PRIMARY KEY (order_item_id),
    KEY order_id (order_id)
    ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    
    CREATE TABLE IF NOT EXISTS wp_woocommerce_payment_tokenmeta (
    meta_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    payment_token_id bigint(20) unsigned NOT NULL,
    meta_key varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    meta_value longtext COLLATE utf8mb4_unicode_ci,
    PRIMARY KEY (meta_id),
    KEY payment_token_id (payment_token_id),
    KEY meta_key (meta_key(32))
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    
    CREATE TABLE IF NOT EXISTS wp_woocommerce_payment_tokens (
    token_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    gateway_id varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
    token text COLLATE utf8mb4_unicode_ci NOT NULL,
    user_id bigint(20) unsigned NOT NULL DEFAULT ‘0’,
    type varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
    is_default tinyint(1) NOT NULL DEFAULT ‘0’,
    PRIMARY KEY (token_id),
    KEY user_id (user_id)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    
    CREATE TABLE IF NOT EXISTS wp_woocommerce_sessions (
    session_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    session_key char(32) COLLATE utf8mb4_unicode_ci NOT NULL,
    session_value longtext COLLATE utf8mb4_unicode_ci NOT NULL,
    session_expiry bigint(20) unsigned NOT NULL,
    PRIMARY KEY (session_id),
    UNIQUE KEY session_key (session_key)
    ) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    
    CREATE TABLE IF NOT EXISTS wp_woocommerce_shipping_zones (
    zone_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    zone_name varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
    zone_order bigint(20) unsigned NOT NULL,
    PRIMARY KEY (zone_id)
    ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    
    CREATE TABLE IF NOT EXISTS wp_woocommerce_shipping_zone_locations (
    location_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    zone_id bigint(20) unsigned NOT NULL,
    location_code varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
    location_type varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL,
    PRIMARY KEY (location_id),
    KEY location_id (location_id),
    KEY location_type_code (location_type(10),location_code(20))
    ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    
    CREATE TABLE IF NOT EXISTS wp_woocommerce_shipping_zone_methods (
    zone_id bigint(20) unsigned NOT NULL,
    instance_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    method_id varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
    method_order bigint(20) unsigned NOT NULL,
    is_enabled tinyint(1) NOT NULL DEFAULT ‘1’,
    PRIMARY KEY (instance_id)
    ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    
    CREATE TABLE IF NOT EXISTS wp_woocommerce_tax_rates (
    tax_rate_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    tax_rate_country varchar(2) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
    tax_rate_state varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
    tax_rate varchar(8) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
    tax_rate_name varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
    tax_rate_priority bigint(20) unsigned NOT NULL,
    tax_rate_compound int(1) NOT NULL DEFAULT ‘0’,
    tax_rate_shipping int(1) NOT NULL DEFAULT ‘1’,
    tax_rate_order bigint(20) unsigned NOT NULL,
    tax_rate_class varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ”,
    PRIMARY KEY (tax_rate_id),
    KEY tax_rate_country (tax_rate_country),
    KEY tax_rate_state (tax_rate_state(2)),
    KEY tax_rate_class (tax_rate_class(10)),
    KEY tax_rate_priority (tax_rate_priority)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    
    CREATE TABLE IF NOT EXISTS wp_woocommerce_tax_rate_locations (
    location_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    location_code varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
    tax_rate_id bigint(20) unsigned NOT NULL,
    location_type varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL,
    PRIMARY KEY (location_id),
    KEY tax_rate_id (tax_rate_id),
    KEY location_type_code (location_type(10),location_code(20))
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    
    CREATE TABLE IF NOT EXISTS `wp_actionscheduler_logs` (
      `log_id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
      `action_id` bigint(20) UNSIGNED NOT NULL,
      `message` text COLLATE utf8mb4_unicode_ci NOT NULL,
      `log_date_gmt` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      `log_date_local` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      PRIMARY KEY (`log_id`),
      KEY `action_id` (`action_id`),
      KEY `log_date_gmt` (`log_date_gmt`)
    ) ENGINE=InnoDB AUTO_INCREMENT=264 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    
    CREATE TABLE IF NOT EXISTS `wp_actionscheduler_groups` (
      `group_id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
      `slug` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
      PRIMARY KEY (`group_id`),
      KEY `slug` (`slug`(191))
    ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    
    CREATE TABLE IF NOT EXISTS `wp_actionscheduler_claims` (
      `claim_id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
      `date_created_gmt` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      PRIMARY KEY (`claim_id`),
      KEY `date_created_gmt` (`date_created_gmt`)
    ) ENGINE=InnoDB AUTO_INCREMENT=959 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    
    CREATE TABLE IF NOT EXISTS `wp_actionscheduler_actions` (
      `action_id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
      `hook` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
      `status` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
      `scheduled_date_gmt` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      `scheduled_date_local` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      `args` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
      `schedule` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
      `group_id` bigint(20) UNSIGNED NOT NULL DEFAULT 0,
      `attempts` int(11) NOT NULL DEFAULT 0,
      `last_attempt_gmt` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      `last_attempt_local` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      `claim_id` bigint(20) UNSIGNED NOT NULL DEFAULT 0,
      `extended_args` varchar(8000) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
      PRIMARY KEY (`action_id`),
      KEY `hook` (`hook`),
      KEY `status` (`status`),
      KEY `scheduled_date_gmt` (`scheduled_date_gmt`),
      KEY `args` (`args`),
      KEY `group_id` (`group_id`),
      KEY `last_attempt_gmt` (`last_attempt_gmt`),
      KEY `claim_id` (`claim_id`)
    ) ENGINE=InnoDB AUTO_INCREMENT=94 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    
    Login or Signup to reply.
  2. I had the same issue after udpating woocommerce, what i ended up doing was removing the tables in phpmyadmin:

    • wp_actionscheduler_actions
    • wp_actionscheduler_claims
    • wp_actionscheduler_groups
    • wp_actionscheduler_logs

    Then creating them through SQL with the following queries:

    create table wp_actionscheduler_actions (
        action_id            bigint unsigned auto_increment primary key,
        hook                 varchar(191)                                  not null,
        status               varchar(20)                                   not null,
        scheduled_date_gmt   datetime        default '0000-00-00 00:00:00' null,
        scheduled_date_local datetime        default '0000-00-00 00:00:00' null,
        args                 varchar(191)                                  null,
        schedule             longtext                                      null,
        group_id             bigint unsigned default '0'                   not null,
        attempts             int             default 0                     not null,
        last_attempt_gmt     datetime        default '0000-00-00 00:00:00' null,
        last_attempt_local   datetime        default '0000-00-00 00:00:00' null,
        claim_id             bigint unsigned default '0'                   not null,
        extended_args        varchar(8000)                                 null
    )
    create table wp_actionscheduler_claims (
        claim_id         bigint unsigned auto_increment primary key,
        date_created_gmt datetime default '0000-00-00 00:00:00' null
    )
    create table wp_actionscheduler_groups (
        group_id bigint unsigned auto_increment primary key,
        slug     varchar(255) not null
    )
    create table wp_actionscheduler_logs (
        log_id         bigint unsigned auto_increment primary key,
        action_id      bigint unsigned                        not null,
        message        text                                   not null,
        log_date_gmt   datetime default '0000-00-00 00:00:00' null,
        log_date_local datetime default '0000-00-00 00:00:00' null
    )
    

    NOTE: You will need to update the database prefix from wp_ to whatever you actually use on your site.

    Hope this helps someone 🙂

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search