Answers.Body: <p>Specifically for the &quot;snap&quot; 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 <code>define('CIVICRM_UPGRADE_SNAPSHOT', FALSE);</code> in civicrm.settings.php.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-07T19:32:39.023Z
Answers.Text: I am getting that error for the table civicrm_install_canary. Is that part of the snapshotting?
Answers.UserDisplayName: Jan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-07T22:58:20.783Z
Answers.Text: 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.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-12-01T19:22:51.987Z
Answers.Text: 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.
Answers.UserDisplayName: Marv S
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-12-01T20:35:27.450Z
Answers.Text: 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](https://docs.civicrm.org/installation/en/latest/general/requirements/#mysql-connection). You could also move the log tables to a [separate database](https://docs.civicrm.org/sysadmin/en/latest/setup/logging/#turning-on-logging).
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-12-04T23:09:08.483Z
Answers.Text: @Demerit Yes.  I'll try to create a separate database for the log.  This seems to be the easiest solution.  Thx.
Answers.UserDisplayName: Marv S
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-07T13:33:46.873Z
Answers.LastActivityDate: 2023-11-07T13:33:46.873Z
Answers.UserDisplayName: Demerit
Answers.Body: <p>Since version 10.1 Drupal recommends <a href="https://www.drupal.org/project/drupal/issues/1650930" rel="nofollow noreferrer">READ COMMITTED by default for MySQL transactions</a>, which leads to an error message about missing primary key of civicrm_install_canary table at fresh CiviCRM installs as well.</p>
  <p>Workaround here could be to add a primary key in mysql:</p>
  <pre><code>ALTER TABLE civicrm_install_canary ADD PRIMARY KEY (id);
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-12-14T09:36:16.387Z
Answers.LastActivityDate: 2023-12-14T09:36:16.387Z
Answers.UserDisplayName: Doka
Body: <p>I am using Drupal version   v10.1.6  and CiviCRM 5.67.0.</p>
  <p>Drupal suggests to use the <code>READ-COMMITTED</code> transaction isolation mode. However, once I switch it on, Drupal complains on the status page:</p>
  <blockquote>
  <p>The following table(s) do not have a primary key: snap_civicrm_v5_65_job</p>
  </blockquote>
  <p>What is the best practice here?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-11-08T14:33:24.097Z
Comments.Text: Welcome @Gogowitsch - I recognize you from using the Nagios module for many years!  If you're looking to monitor CiviCRM w/ Nagios-compatible tools, I [have a script here](https://github.com/MegaphoneJon/check_civicrm) which runs remotely. https://github.com/MegaphoneJon/com.megaphonetech.monitoring creates a limited user for this.  Or you can use `cv` to monitor locally.
Comments.UserDisplayName: Jon G - Megaphone Tech
Tags: <drupal>
Title: Drupal 10 requirements status page: CiviCRM tables without a primary key
ThreadText: # Drupal 10 requirements status page: CiviCRM tables without a primary key
  
  (Asked by: username_0 on 2023-11-07)
  
  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?
  
  **Tags:** drupal
  
  > **Comments:**
  > **username_1**: Welcome @username_0 - I recognize you from using the Nagios module for many years!  If you're looking to monitor CiviCRM w/ Nagios-compatible tools, I [have a script here](https://github.com/MegaphoneJon/check_civicrm) which runs remotely. https://github.com/MegaphoneJon/com.megaphonetech.monitoring creates a limited user for this.  Or you can use `cv` to monitor locally.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2023-11-07. Score: 4
  
  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.
  
  > **Comments:**
  > **username_3**: I am getting that error for the table civicrm_install_canary. Is that part of the snapshotting?  
  > **username_2**: 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.  
  > **username_4**: 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.  
  > **username_2**: 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](https://docs.civicrm.org/installation/en/latest/general/requirements/#mysql-connection). You could also move the log tables to a [separate database](https://docs.civicrm.org/sysadmin/en/latest/setup/logging/#turning-on-logging).  
  > **username_4**: @username_2 Yes.  I'll try to create a separate database for the log.  This seems to be the easiest solution.  Thx.  
  
  ---
  
  ### Answer by username_5 on 2023-12-14. Score: 1
  
  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);
  
  
  ---
  
  