Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
$ ActiveRecord::Base.connection.reset_pk_sequence!('table_name')

If you need the table names:

$ ActiveRecord::Base.connection.tables
=> ["accounts", "assets", ...]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment