Missing primary keys

Created on 19 March 2021, over 3 years ago
Updated 4 September 2024, 2 months ago

Following tables are missing a primary key (which is required for database replication):

  • activity_notification_status
  • user_activity_digest
  • user_activity_send
🐛 Bug report
Status

Needs review

Version

12.4

Component

Code (back-end)

Created by

🇧🇪Belgium matthijs

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

Merge Requests

Comments & Activities

Not all content is available!

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

  • 🇺🇦Ukraine rollins

    Result of update commands:

    [notice] Update started: activity_creator_update_8803
    [error]  SQLSTATE[42000]: Syntax error or access violation: 1280 Incorrect index name 'ansid_tmp': ALTER TABLE "activity_notification_status" ADD PRIMARY KEY ("ansid"); Array
    
    [error]  Update failed: activity_creator_update_8803
    [notice] Update started: activity_send_update_8003
    [error]  SQLSTATE[42000]: Syntax error or access violation: 1280 Incorrect index name 'uasid_tmp': ALTER TABLE "user_activity_send" ADD PRIMARY KEY ("uasid"); Array
    
    [error]  Update failed: activity_send_update_8003
    [notice] Update started: activity_send_email_update_8002
    [error]  SQLSTATE[42000]: Syntax error or access violation: 1280 Incorrect index name 'uadid_tmp': ALTER TABLE "user_activity_digest" ADD PRIMARY KEY ("uadid"); Array
    
    [error]  Update aborted by: activity_creator_update_8803, activity_send_update_8003, activity_send_email_update_8002
    [error]  Finished performing updates.
  • Merge request !72Translated using Weblate (Romanian) → (Closed) created by rollins
  • 🇺🇦Ukraine rollins

    rollins changed the visibility of the branch 3204517-add-primary-keys to active.

  • Merge request !73Issue #3204517: Missing primary keys → (Open) created by rollins
  • 🇮🇱Israel AviG

    I am using Drupal 10.2.7 and Open Social 12.4.2. In every installation I try I get the above error with the 3 missing keys activity_notification_status
    user_activity_digest
    user_activity_send
    The way I managed to remove the error from the Status page is by creating the column on the database itself, like that:

    ALTER TABLE `user_activity_send`
    ADD COLUMN `uadid` INT NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST;

    and did that with the other 2 tables.

    It removed the error. Hopefully, I won't get any issues further down the road.

  • 🇮🇳India nmridul

    I updated to 12.4.5 and still has this issue.
    https://www.drupal.org/project/social/issues/3204517#comment-15749361 🐛 Missing primary keys Needs review -> It should be available from 12.4.4 according to this comment ?

Production build 0.71.5 2024