-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update location_cache to update remote_urls on fetch. Add table schem…
…as for two tables
- Loading branch information
Showing
4 changed files
with
50 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
CREATE TABLE `node_cities` ( | ||
`node_address` varchar(100) NOT NULL, | ||
`city` varchar(75) DEFAULT NULL, | ||
PRIMARY KEY (`node_address`) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
CREATE TABLE `node_uptime` ( | ||
`node_address` varchar(100) NOT NULL, | ||
`remote_url` varchar(500) DEFAULT NULL, | ||
`tries` bigint NOT NULL DEFAULT '0', | ||
`success` bigint NOT NULL DEFAULT '0', | ||
`success_rate` decimal(6,3) NOT NULL DEFAULT '0.000', | ||
PRIMARY KEY (`node_address`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
SELECT t1.node_address, t1.remote_url, t2.node_address, t2.remote_url | ||
FROM node_uptime t1 | ||
JOIN node_uptime t2 ON t1.remote_url = t2.remote_url | ||
WHERE t1.node_address <> t2.node_address; |