Missing primary keys in custom tables

Created on 28 February 2025, about 1 month ago

Problem/Motivation

The "email_login_otp" and "otp_settings" tables do not have a primary key, which causes an error to appear in the status report.

Steps to reproduce

Proposed resolution

Add a primary key to those table definitions inside email_login_otp_schema() and write a hook_update_N() implementation to add those keys to existing installs.

Here is a patch which does this.
As far as I can tell from reading through the code the composite key of "uid,otp" should be unique.

🐛 Bug report
Status

Active

Version

1.1

Component

Code

Created by

🇫🇷France arousseau

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

Comments & Activities

Production build 0.71.5 2024