From e430b074ce48ad288497d639e39f5d572ab4c1c0 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 21 Aug 2019 06:18:32 +0000 Subject: [PATCH 1/2] Fix table structure definition --- static/dbstructure.config.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/dbstructure.config.php b/static/dbstructure.config.php index a00d957273..7a33a22b53 100755 --- a/static/dbstructure.config.php +++ b/static/dbstructure.config.php @@ -44,13 +44,13 @@ return [ "id" => ["type" => "mediumint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Password ID for revocation"], "uid" => ["type" => "mediumint unsigned", "not null" => "1", "relation" => ["user" => "uid"], "comment" => "User ID"], "description" => ["type" => "varchar(255)", "comment" => "Description of the usage of the password"], - "hashed_password" => ["type" => "varchar(255)", "not null" => "1", "primary" => "1", "comment" => "Hashed password"], + "hashed_password" => ["type" => "varchar(255)", "not null" => "1", "comment" => "Hashed password"], "generated" => ["type" => "datetime", "not null" => "1", "comment" => "Datetime the password was generated"], "last_used" => ["type" => "datetime", "comment" => "Datetime the password was last used"], ], "indexes" => [ "PRIMARY" => ["id"], - "uid_description" => ["uid", "description"], + "uid_description" => ["uid", "description(190)"], ] ], "2fa_recovery_codes" => [ From a483ea8acb48b8c1c367d8abf8eb6b1cfd0dadbe Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 21 Aug 2019 21:11:37 +0000 Subject: [PATCH 2/2] Increasing database version number --- database.sql | 4 ++-- static/dbstructure.config.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/database.sql b/database.sql index c7d37a4134..d42f61f902 100644 --- a/database.sql +++ b/database.sql @@ -1,6 +1,6 @@ -- ------------------------------------------ -- Friendica 2019.09-rc (Dalmatian Bellflower) --- DB_UPDATE_VERSION 1321 +-- DB_UPDATE_VERSION 1322 -- ------------------------------------------ @@ -15,7 +15,7 @@ CREATE TABLE IF NOT EXISTS `2fa_app_specific_password` ( `generated` datetime NOT NULL COMMENT 'Datetime the password was generated', `last_used` datetime COMMENT 'Datetime the password was last used', PRIMARY KEY(`id`), - INDEX `uid_description` (`uid`,`description`) + INDEX `uid_description` (`uid`,`description`(190)) ) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Two-factor app-specific _password'; -- diff --git a/static/dbstructure.config.php b/static/dbstructure.config.php index 7a33a22b53..2c8f4b34be 100755 --- a/static/dbstructure.config.php +++ b/static/dbstructure.config.php @@ -34,7 +34,7 @@ use Friendica\Database\DBA; if (!defined('DB_UPDATE_VERSION')) { - define('DB_UPDATE_VERSION', 1321); + define('DB_UPDATE_VERSION', 1322); } return [