]> git.mxchange.org Git - friendica.git/blobdiff - config/dbstructure.config.php
Fix database structure definition, primary keys must be marked as this
[friendica.git] / config / dbstructure.config.php
index baca2bec635abe698d7274af6075aa5313f3c69c..57e4378376e08eb72e3f8b7302c5170523761350 100755 (executable)
@@ -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"],
                ],