New element creation error
beamalsky opened this issue · 3 comments
beamalsky commented
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.
beamalsky commented
I think this is the problem and a fix: https://hcmc.uvic.ca/blogs/index.php/how_to_fix_postgresql_error_duplicate_ke?blog=22
beamalsky commented
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