From fe39c3929b109a3e3c658a6f5798eb22c4570dc4 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 16 Feb 2025 10:54:01 +0000 Subject: [PATCH] Handle redirected servers in server detection. #14819 --- database.sql | 1 + doc/database/db_gserver.md | 13 +++++++------ static/dbstructure.config.php | 1 + 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/database.sql b/database.sql index 1b6cf75bf7..56d265b87f 100644 --- a/database.sql +++ b/database.sql @@ -46,6 +46,7 @@ CREATE TABLE IF NOT EXISTS `gserver` ( UNIQUE INDEX `nurl` (`nurl`(190)), INDEX `next_contact` (`next_contact`), INDEX `network` (`network`), + INDEX `redirect-gsid` (`redirect-gsid`), FOREIGN KEY (`redirect-gsid`) REFERENCES `gserver` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE ) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Global servers'; diff --git a/doc/database/db_gserver.md b/doc/database/db_gserver.md index 6770b50e26..22939ec2bc 100644 --- a/doc/database/db_gserver.md +++ b/doc/database/db_gserver.md @@ -46,12 +46,13 @@ Fields Indexes ------------ -| Name | Fields | -| ------------ | ----------------- | -| PRIMARY | id | -| nurl | UNIQUE, nurl(190) | -| next_contact | next_contact | -| network | network | +| Name | Fields | +| ------------- | ----------------- | +| PRIMARY | id | +| nurl | UNIQUE, nurl(190) | +| next_contact | next_contact | +| network | network | +| redirect-gsid | redirect-gsid | Foreign Keys ------------ diff --git a/static/dbstructure.config.php b/static/dbstructure.config.php index a780496c81..c503e4f63e 100644 --- a/static/dbstructure.config.php +++ b/static/dbstructure.config.php @@ -92,6 +92,7 @@ "nurl" => ["UNIQUE", "nurl(190)"], "next_contact" => ["next_contact"], "network" => ["network"], + "redirect-gsid" => ["redirect-gsid"], ] ], "user" => [