Skip to content

Commit

Permalink
Fix dump-registered-relays-topology script for db-sync schema changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jbgi committed Jul 7, 2020
1 parent a49bb86 commit 1d9d4c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions roles/explorer.nix
Expand Up @@ -104,9 +104,9 @@ in {
extract_relays_sql = writeText "extract_relays.sql" ''
select array_to_json(array_agg(row_to_json(t))) from (
select COALESCE(ipv4, dns_name) as addr, port from (
select min(pool_id) as pool_id, ipv4, dns_name, port from pool_relay where
select min(update_id) as update_id, ipv4, dns_name, port from pool_relay where
ipv4 is null or ipv4 !~ '(^0\.)|(^10\.)|(^100\.6[4-9]\.)|(^100\.[7-9]\d\.)|(^100\.1[0-1]\d\.)|(^100\.12[0-7]\.)|(^127\.)|(^169\.254\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^192\.0\.0\.)|(^192\.0\.2\.)|(^192\.88\.99\.)|(^192\.168\.)|(^198\.1[8-9]\.)|(^198\.51\.100\.)|(^203.0\.113\.)|(^22[4-9]\.)|(^23[0-9]\.)|(^24[0-9]\.)|(^25[0-5]\.)'
group by ipv4, dns_name, port order by pool_id
group by ipv4, dns_name, port order by update_id
) t
) t;
'';
Expand Down

0 comments on commit 1d9d4c7

Please sign in to comment.