Skip to content

Instantly share code, notes, and snippets.

@pierreboissinot
Created May 28, 2018 07:41
Show Gist options
  • Save pierreboissinot/e33cf6a9b6aa9c034079c16bdd5bffed to your computer and use it in GitHub Desktop.
Save pierreboissinot/e33cf6a9b6aa9c034079c16bdd5bffed to your computer and use it in GitHub Desktop.
-- when the database/ORM try to insert a record with an existing id/PK
ALTER SEQUENCE sequence_name RESTART WITH your_next_free_id;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment