Module is incompatible with Drupal Configuration Sync processes

Created on 3 December 2020, about 4 years ago
Updated 9 February 2024, 11 months ago

Problem/Motivation

If you install this module on one environment and then export the configurations from that environment and import into another environment, the necessary tables don't get created and it puts the other environment in a broken state where you can't do anything with the cron because The Ultimate Cron tables do not exist.

This is a huge problem because

1) You can't disable the module and reenable it to properly run the install scripts
2) You can't do anything with Ultimate Cron

The site just gets into a broken state

Steps to reproduce

In Environment A:

1) install module
2) Run drush cex to export configurations

In Environment B:

3) Run drush cim to import the configurations
4) Try to navigate to The Ultimate Cron settings and you will be presented with an unexpected error. In the recent logs, the error is revealed to be an SQL error due to missing ultimate_cron tables

🐛 Bug report
Status

Postponed: needs info

Version

2.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • I can also reproduce this issue. I fixed it by recreating the ultimate cron tables.

  • Status changed to Postponed: needs info 11 months ago
  • 🇨🇭Switzerland berdir Switzerland

    Still unable to reproduce this. The module just implements hook_schema() like many other modules.

  • I had the same issue with a multi-site Drupal 10.1.8
    Site1 was fine
    Site2: After updated and cim, it was showing the similar message as in #5
    As mentioned in previous comments, only known solution was to create tables manually.

    drush --uri= sql-query "CREATE TABLE ultimate_cron_log ( lid varchar(176) NOT NULL COMMENT 'Lock ID', name varchar(166) NOT NULL COMMENT 'Name', log_type int(11) NOT NULL DEFAULT '0' COMMENT 'Log type', start_time double NOT NULL DEFAULT '0' COMMENT 'Timestamp of execution start', end_time double NOT NULL DEFAULT '0' COMMENT 'Timestamp of execution end', uid int(11) NOT NULL DEFAULT '0' COMMENT 'User ID', init_message text COMMENT 'Initial message', message text COMMENT 'Message', severity int(11) DEFAULT '-1' COMMENT 'Max severity level of the execution', PRIMARY KEY (lid), KEY idx_last (name(80),start_time,end_time,log_type)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Logs'"

    drush --uri= sql-query "CREATE TABLE ultimate_cron_lock ( lid bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Lock ID', name varchar(166) NOT NULL COMMENT 'Name', current bigint(20) NOT NULL DEFAULT 0 COMMENT 'Current lock', expire double NOT NULL DEFAULT 0 COMMENT 'Expiration time of lock', PRIMARY KEY (lid), UNIQUE KEY idx_name (name,current)\n) ENGINE=InnoDB AUTO_INCREMENT=2241728 DEFAULT CHARSET=utf8mb4 COMMENT='Locks'"

    drush --uri= sql-query "CREATE TABLE ultimate_cron_signal ( job_name varchar(166) NOT NULL COMMENT 'Name of job', signal_name varchar(166) NOT NULL COMMENT 'Name of signal', claimed tinyint(4) NOT NULL DEFAULT 0 COMMENT 'Is signal claimed', PRIMARY KEY (job_name,signal_name)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Signals'"

Production build 0.71.5 2024