Tech4covid19/trackovid19-backend

[backend] Create postal codes DB tables

pfortuna opened this issue · 1 comments

The complete list of Portuguese Postal Codes is here:
http://centraldedados.pt/codigos_postais/
File: codigos_postais.csv

We want to create a new DB table "pt_postal_codes" with the following columns

  • postal_code (PK) (only 4 digits)
  • name (the name should be common to all rows having the same initial 4 digits)
  • concelho (see corresponding name in concelho.csv)
  • distrito (see corresponding name in distritos.csv)

It seems that some Postal Codes (4 digits) span across multiple Concelhos.

So we need something like this:

  • postal_code (PK) (only 4 digits)
  • concelho (see corresponding name in concelho.csv) PK
  • name (the name should be common to all rows having the same initial 4 digits)
  • distrito (see corresponding name in distritos.csv)