Created
March 18, 2019 14:16
-
-
Save diligasi/bbd6ba53f5cb10ede0ac2659694d8654 to your computer and use it in GitHub Desktop.
Reset table sequences to it's max value
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 do |table_name| | |
ActiveRecord::Base.connection.reset_pk_sequence!(table_name) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment