Robby Russell wrote in post #72333:
SELECT MAX(id) FROM entities;
Then run...
This should be higher than the last result.
If it's not higher... run this to try and fix it. (run a quick
pg_dump first...)
SELECT setval('entities_id_seq', (SELECT MAX(id) FROM entities)+1);
reload your app...and see if its still happening.
SELECT MAX(id) FROM entities;
Then run...
This should be higher than the last result.
If it's not higher... run this to try and fix it. (run a quick
pg_dump first...)
SELECT setval('entities_id_seq', (SELECT MAX(id) FROM entities)+1);
reload your app...and see if its still happening.
relate the solution here (names of tables, etc.) to the data given by
the OP. How do you know you need to SELECT MAX(id) FROM entities, or
SELECT setval('entities_id_seq', (SELECT MAX(id) FROM entities)+1);
with the information given by the OP? I can't see the relation and
therefore I have no clue how I can solve my problem.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.