kartoza / fbf-project

Project data and resources for WB Forecast Based Financing work
22 stars 14 forks source link

Notes table #211

Closed timlinux closed 4 years ago

timlinux commented 4 years ago

I would like to have a table for storing explanatory hazard_notes. The schema can be as simple as:

id (serial), notes (text), order (int), hazard_type(int)

and the hazard type table would be:

id (serial), name (text) 1, Flood forecast

After this report I am working on goes out I would like to refactor all the flood prefixed tables to be prefixed with hazard rather, and then each event should have a hazard_type_id. This will open the system to be used with other hazards e.g. cyclone in the future.

The hazard_notes table should be used to provide a set of notes in the report (dashboard and spreadsheet). In the spreadsheet it could maybe go in its own tab. In those notes we will emumerate all the caveats and constraints of the system. I can just edit the notes using my SQL client, no need for front end forms to manage it.

NyakudyaA commented 4 years ago

@timlinux I already created the notes table in the DB as report_notes notes

Should we modify this or it's a seperate one ?

timlinux commented 4 years ago

Just modify this one thanks @NyakudyaA to include the hazard type and naming conventions

NyakudyaA commented 4 years ago

@timlinux I have created these tables but guess we should rename the column "order" to something because it conflicts with the reserved word in the DB.

NyakudyaA commented 4 years ago

This is done