Skip to content

Commit

Permalink
Merge branch 'bexley-ww-update-address-lookup-db' into commercial-sta…
Browse files Browse the repository at this point in the history
…ging
  • Loading branch information
nephila-nacrea committed Aug 1, 2024
2 parents 83a572a + ec100b4 commit 34dbc2a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions bin/bexley/make-bexley-ww-postcode-db
Original file line number Diff line number Diff line change
Expand Up @@ -250,4 +250,16 @@ while( my $row = $csv->getline($fh) ) {
}
}

# It is possible for UPRNs in child_uprns to not occur in the postcodes table
# (an 'empty' address).
# At least one address, UPRN 100020276242, was not being picked up
# by Bexley WW's address lookup, because it appeared as a parent_uprn in this
# table, but its 'child' addresses were empty.
$db->do(<<SQL);
DELETE FROM child_uprns
WHERE uprn NOT IN (
SELECT uprn FROM postcodes
)
SQL

say 'Tables populated';

0 comments on commit 34dbc2a

Please sign in to comment.