Hi, I imported directly into postrges (using pgadmin, 200 rows). but now when I create a new record it creates a pk violation because the primary key already exists.
How do I correct this?
Hi, I imported directly into postrges (using pgadmin, 200 rows). but now when I create a new record it creates a pk violation because the primary key already exists.
How do I correct this?
I assume you would need to restart your sequence and I think the new start value should be the current max(id)
value
Thanks. I just ran a quick loop in the console that attempted to create the records (about 200) and it moved the pk up.