datamade/just-spaces

New element creation error

Closed this issue · 3 comments

When I create a new survey locally and try to add a new element to it, I get this error:

IntegrityError at /elements/create/4/float/
duplicate key value violates unique constraint "fobi_formelemententry_pkey"
DETAIL:  Key (id)=(2) already exists.

That's not good, let's fix it! This is with a database restored from just-spaces.dump.

The problem here is that the just-spaces.dump file has lost id sequences. I see how to restore those manually, but I'm not confident that those won't just be lost again if I redo the data dump. @jeancochrane have you already gone down this path? If so I'd love to chat about it, if not I'll spend some more time researching

Fixed by #75