You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many sequences in the empty breedbase db are not reset, and some of them are out of sync with what data there is, causing problems.
For example even though there is a single example project row in the project table with a project_id of 1, SELECT last_value FROM project_project_id_seq; returns 324.
More importantly the single row in the projectprop table used projectprop_id 456. SELECT last_value FROM projectprop_projectprop_id_seq; returns 455, meaning any additions to the table will increment the seq to 456 and run into a duplicate key value violates unique constraint "projectprop_pkey" error.
To fix the problem for the project tables I ended up just manually deleting the example program and prop, then reset the sequences:
breedbase=# delete from projectprop where project_id = 1;
DELETE 1
breedbase=# delete from project where project_id = 1;
DELETE 1
breedbase=# alter sequence project_project_id_seq restart with 1;
ALTER SEQUENCE
breedbase=# alter sequence projectprop_projectprop_id_seq restart with 1;
ALTER SEQUENCE
The text was updated successfully, but these errors were encountered:
Many sequences in the empty breedbase db are not reset, and some of them are out of sync with what data there is, causing problems.
For example even though there is a single example project row in the project table with a project_id of
1
,SELECT last_value FROM project_project_id_seq;
returns324
.More importantly the single row in the projectprop table used projectprop_id
456
.SELECT last_value FROM projectprop_projectprop_id_seq;
returns455
, meaning any additions to the table will increment the seq to456
and run into aduplicate key value violates unique constraint "projectprop_pkey"
error.To fix the problem for the project tables I ended up just manually deleting the example program and prop, then reset the sequences:
The text was updated successfully, but these errors were encountered: