lib/arcopy/copy.rb
# Reset auto increments for postgres databases
Reset auto increments for postgres databases
Reset auto increments for postgres databases
def reset_pg_ai
      @reset_tables.each do |table|
        TargetDB.connection.execute "SELECT setval('#{table}_id_seq', (select max(id) + 1 from #{table}))"
        puts "  -> resetting #{table} " + "\u{2713}".colorize(:green)
      end
    end
def reset_pg_ai @reset_tables . each do | table | TargetDB . connection . execute "SELECT setval('#{table}_id_seq', (select max(id) + 1 from #{table}))" puts "  -> resetting #{table} " + "\u{2713}" . colorize ( :green ) end end
Reset auto increments for postgres databases
Reset auto increments for postgres databases