# Updates all sequences in Rails to MAX(id)+1
ActiveRecord::Base.connection.tables.each do |table|
ActiveRecord::Base.connection.reset_pk_sequence!(table)
end
Conteúdo para você se capacitar em programação
# Updates all sequences in Rails to MAX(id)+1
ActiveRecord::Base.connection.tables.each do |table|
ActiveRecord::Base.connection.reset_pk_sequence!(table)
end