Skip to content

Commit

Permalink
Handle redirected servers in server detection. friendica#14819
Browse files Browse the repository at this point in the history
  • Loading branch information
annando committed Feb 16, 2025
1 parent aa080a0 commit fe39c39
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions database.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
13 changes: 7 additions & 6 deletions doc/database/db_gserver.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
------------
Expand Down
1 change: 1 addition & 0 deletions static/dbstructure.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
"nurl" => ["UNIQUE", "nurl(190)"],
"next_contact" => ["next_contact"],
"network" => ["network"],
"redirect-gsid" => ["redirect-gsid"],
]
],
"user" => [
Expand Down

0 comments on commit fe39c39

Please sign in to comment.