Merge pull request #14823 from annando/fix-14819

Fixes PR #14819: Add missing index
This commit is contained in:
Tobias Diekershoff 2025-02-16 16:32:10 +01:00 committed by GitHub
commit 3ecae98f86
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 8 deletions

View file

@ -1,6 +1,6 @@
-- ------------------------------------------ -- ------------------------------------------
-- Friendica 2025.02-dev (Interrupted Fern) -- Friendica 2025.02-dev (Interrupted Fern)
-- DB_UPDATE_VERSION 1578 -- DB_UPDATE_VERSION 1579
-- ------------------------------------------ -- ------------------------------------------
@ -46,6 +46,7 @@ CREATE TABLE IF NOT EXISTS `gserver` (
UNIQUE INDEX `nurl` (`nurl`(190)), UNIQUE INDEX `nurl` (`nurl`(190)),
INDEX `next_contact` (`next_contact`), INDEX `next_contact` (`next_contact`),
INDEX `network` (`network`), INDEX `network` (`network`),
INDEX `redirect-gsid` (`redirect-gsid`),
FOREIGN KEY (`redirect-gsid`) REFERENCES `gserver` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE FOREIGN KEY (`redirect-gsid`) REFERENCES `gserver` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE
) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Global servers'; ) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Global servers';

View file

@ -46,12 +46,13 @@ Fields
Indexes Indexes
------------ ------------
| Name | Fields | | Name | Fields |
| ------------ | ----------------- | | ------------- | ----------------- |
| PRIMARY | id | | PRIMARY | id |
| nurl | UNIQUE, nurl(190) | | nurl | UNIQUE, nurl(190) |
| next_contact | next_contact | | next_contact | next_contact |
| network | network | | network | network |
| redirect-gsid | redirect-gsid |
Foreign Keys Foreign Keys
------------ ------------

View file

@ -44,7 +44,7 @@ use Friendica\Database\DBA;
// This file is required several times during the test in DbaDefinition which justifies this condition // This file is required several times during the test in DbaDefinition which justifies this condition
if (!defined('DB_UPDATE_VERSION')) { if (!defined('DB_UPDATE_VERSION')) {
define('DB_UPDATE_VERSION', 1578); define('DB_UPDATE_VERSION', 1579);
} }
return [ return [
@ -92,6 +92,7 @@ return [
"nurl" => ["UNIQUE", "nurl(190)"], "nurl" => ["UNIQUE", "nurl(190)"],
"next_contact" => ["next_contact"], "next_contact" => ["next_contact"],
"network" => ["network"], "network" => ["network"],
"redirect-gsid" => ["redirect-gsid"],
] ]
], ],
"user" => [ "user" => [