     output_id INTEGER NOT NULL, -- FK to output.id
     loss_map_ref VARCHAR,
     end_branch_label VARCHAR,
-    loss_category VARCHAR, -- open-ended, cfr Vitor's mail
-    unit VARCHAR, -- open-ended
-    -- time_span and poe are significant only for probabilistic calculations,
+    loss_category VARCHAR,
+    unit VARCHAR, -- e.g. USD, EUR
+    -- poe and time_span are significant only for probabilistic calculations,
     -- fact that is hard to enforce here
-    time_span float CONSTRAINT non_negative_time_span CHECK (time_span >= 0.0),
+    -- the time_span AKA investigation_time is stored in the oq_params table
     poe float CONSTRAINT valid_poe CHECK ((poe >= 0.0) AND (poe <= 1.0))
 ) TABLESPACE uiapi_ts;
 



-- Loss map data.

-- Design decision: store both probabilistic and event based loss map in the
-- same tables (with some checks for consistency)

            OR (loss_value IS NOT NULL AND loss_mean IS NULL AND loss_std_dev IS NULL))
) TABLESPACE uiapi_ts;
SELECT AddGeometryColumn('uiapi', 'loss_map_site_data', 'site', 4326, 'POINT', 2);


-- Loss asset data.
