Created
March 17, 2017 10:04
-
-
Save luxxi/82886c29cf8116a92dcdb1eeca6786ee to your computer and use it in GitHub Desktop.
Reset primary key sequence in postgres
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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