Atualize todas as sequências de pkey PostgreSQL no Rails

# Updates all sequences in Rails to MAX(id)+1

ActiveRecord::Base.connection.tables.each do |table|
ActiveRecord::Base.connection.reset_pk_sequence!(table)
end