From 48ffed78d7b004297de8c5699573d98bfc551e9e Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 16 May 2019 19:53:07 +0000 Subject: [PATCH] Fix database structure definition, primary keys must be marked as this --- config/dbstructure.config.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/dbstructure.config.php b/config/dbstructure.config.php index baca2bec63..57e4378376 100755 --- a/config/dbstructure.config.php +++ b/config/dbstructure.config.php @@ -41,8 +41,8 @@ return [ "2fa_recovery_codes" => [ "comment" => "Two-factor authentication recovery codes", "fields" => [ - "uid" => ["type" => "int unsigned", "not null" => "1", "comment" => "User ID"], - "code" => ["type" => "varchar(50)", "not null" => "1", "comment" => "Recovery code string"], + "uid" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "relation" => ["user" => "uid"], "comment" => "User ID"], + "code" => ["type" => "varchar(50)", "not null" => "1", "primary" => "1", "comment" => "Recovery code string"], "generated" => ["type" => "datetime", "not null" => "1", "comment" => "Datetime the code was generated"], "used" => ["type" => "datetime", "comment" => "Datetime the code was used"], ],