Skip to content

Instantly share code, notes, and snippets.

@doabit
Created December 1, 2013 05:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save doabit/7728757 to your computer and use it in GitHub Desktop.
Save doabit/7728757 to your computer and use it in GitHub Desktop.
rails postgresql sequence reset
ActiveRecord::Base.connection.tables.each { |t| ActiveRecord::Base.connection.reset_pk_sequence!(t) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment