Generic SQL UUID updater 1.2

Migrate UUIDs in any SQL database.

  1. CyberTiger
    A program to update UUIDs in an arbitrary database table.

    Sometimes you want to switch from offline to online uuids (or vice versa), or a plugin's migration script is broken and you end up with a database full of empty UUIDs, this is a program to update the UUIDs in an SQL table from a column in the same table containing usernames.

    If you're not familiar with SQL or don't have time to figure out your plugin's undocumented SQL schema, you probably shouldn't be messing with this.

    Supported databases:
    • MySQL
    • Postgresql
    • H2
    • Derby

    Backup your databases before using this tool!

    Code (Text):
    Usage: java -jar sql-converter.jar [-R <rate>] [-n] [-d] [-o] [-F] [-u <username>] [-p <password>] <database url> <table> <name column> <uuid column>
      -R <rate>  - Maximum number of queries per 10 minutes, default 600
      -n  - dry run, don't do anything.
      -d  - Delete rows for names with no valid UUID.
      -o  - Use offline UUIDs
      -F  - Update existing UUIDs, don't just replace NULL
      -V  - Don't skip rows with invalid UUIDS
      -e <char>  - Escape for table and column names, default: none
      -u <username> - Database username
      -p <password> - Database password
      -f <format>  - UUIDs use the specified format
      java  - Java's built in UUID format including '-' (default)
      numeric  - Use BigDecimal
      hexadecimal - Hex format, like java's without -
      mojang  - Hex format, like java's without -, and no leading zeros
    Example usage:

    Code (Text):
    java -jar sql-converter-1.0-SNAPSHOT.jar -f hexadecimal -d -u gesuit -p password jdbc:mysql://localhost/gesuit bans banned_playername banned_uuid
    ediTv2 and danenco like this.