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

Update dataseries for year #255

Closed LBeaulaton closed 1 year ago

LBeaulaton commented 1 year ago

when trying to update get: Error: Failed to fetch row: ERROR: duplicate key value violates unique constraint "c_uk_year_ser_id" DETAIL: Key (das_year, das_ser_id)=(1982, 220) already exists.

while there is only 1 data for this year

elfunesto commented 1 year ago

As seen with Laurent, this is not truly a bug. Laurent will try to make the update with a workaround

LBeaulaton commented 1 year ago

error is due to a whole series (das_ser_id = 220) that need to be updated because the season has been wrongly attributed to n+1 instead of n. I have first deleted the whole series and then inserted again the new series.

LBeaulaton commented 1 year ago

image

elfunesto commented 1 year ago

This lattest bug was fixed: it happens when both updated and new are empty, might also occur in importdcfstep1

LBeaulaton commented 1 year ago

still error : multi-argument returns are not permitted

LBeaulaton commented 1 year ago

The solution is:

  1. delete the series (put them all to the deleted_data sheet)
  2. add them again (through the new_data sheet)