I am using Drupal version v10.1.6 and CiviCRM 5.67.0.

Drupal suggests to use the READ-COMMITTED transaction isolation mode. However, once I switch it on, Drupal complains on the status page:

The following table(s) do not have a primary key: snap_civicrm_v5_65_job

What is the best practice here?


2 Answers 2


Specifically for the "snap" tables those are extra backups the upgrade makes. If your upgrade went well you can delete that table. If you normally make backups before upgrade anyway you can turn off snapshots by putting define('CIVICRM_UPGRADE_SNAPSHOT', FALSE); in civicrm.settings.php.

  • 2
    I am getting that error for the table civicrm_install_canary. Is that part of the snapshotting?
    – Jan
    Nov 7, 2023 at 19:32
  • 1
    It's part of a normal install. There was some small talk once of replacing it somehow. You can ignore the error for it but you could also just manually add a fake primary key to it. It's only used to determine status.
    – Demerit
    Nov 7, 2023 at 22:58
  • I upgraded a Civi site from D9 to D10 and got that error except with a large number of tables. It seems the error is irrelevant except it's a nuisance to see on the status screen each time.
    – Marv S
    Dec 1, 2023 at 19:22
  • My guess would be you mean tables that start with log_? You could consider reconfiguring to split the databases so civi is in a separate database. You could also move the log tables to a separate database.
    – Demerit
    Dec 1, 2023 at 20:35
  • @Demerit Yes. I'll try to create a separate database for the log. This seems to be the easiest solution. Thx.
    – Marv S
    Dec 4, 2023 at 23:09

Since version 10.1 Drupal recommends READ COMMITTED by default for MySQL transactions, which leads to an error message about missing primary key of civicrm_install_canary table at fresh CiviCRM installs as well.

Workaround here could be to add a primary key in mysql:

ALTER TABLE civicrm_install_canary ADD PRIMARY KEY (id);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.