ices-eg / wg_WGEEL

Joint EIFAAC/ICES/GFCM Working Group on Eels
http://ices.dk/community/groups/Pages/WGEEL.aspx
5 stars 12 forks source link

Annex 8 newdata eel_qal_id changed to 0 in downloaded newdata file #285

Closed ciaraoleary closed 5 months ago

ciaraoleary commented 10 months ago

For Annnex 8 i uploaded a file with 1 row of new data with eel_qal_id of 1 but when i downloaded the newdataseries file it had a eel_qal_id of 0.

data integration wouldn't let me upload until i had changed it back to 1 C

cedricbriandgithub commented 5 months ago

check if there is a constraint

cedricbriandgithub commented 5 months ago

I checked, it's not the problem but if there is no aquaculture don't try to provide a value. In the shiny there is a message if the qal_id is missing, in the db there is indeed a constraint, you cannot have qal_id 0 and missing value qal, I guess that using the minor case np instead of NP was the problem there image

ALTER TABLE datawg.t_eelstock_eel ADD CONSTRAINT ck_qal_id_and_missvalue CHECK ((eel_missvaluequal IS NULL) or (eel_qal_id != 0));