Skip to content

Instantly share code, notes, and snippets.

@danieljohnmorris
Created October 10, 2013 17:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danieljohnmorris/6922337 to your computer and use it in GitHub Desktop.
Save danieljohnmorris/6922337 to your computer and use it in GitHub Desktop.
Postgres.app dev db fix bugged table id constraints
psql -h localhost
\c gsa_development;
REINDEX DATABASE gsa_development;
SELECT MAX(id) FROM taggings;
SELECT nextval('taggings_id_seq');
SELECT setval('taggings_id_seq', (SELECT MAX(id) FROM taggings)+1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment