agave-migrations/src/main/java/org/iplantc/service/common/migration/utils/ColumnUtil.java
/**
     * Makes the {@code uuid} column a unique index on the given table.
     *  
     * @param connection the current database connectino passed in by Flyway
     * @param tableName the table to udpate
     * @throws Exception whenever the prepared statement to add a unique index fails.
     */
Makes the  uuid column a unique index on the given table.

@param connection the current database connectino passed in by Flyway
@param tableName the table to udpate
@throws Exception whenever the prepared statement to add a unique index fails.
Makes the uuid column a unique index on the given table . @param connection the current database connectino passed in by Flyway @param tableName the table to udpate @throws Exception whenever the prepared statement to add a unique index fails .
public static void addUniqueIndex(Connection connection, String tableName) throws Exception{
        PreparedStatement stmt = connection.prepareStatement("ALTER TABLE " + tableName + " ADD UNIQUE INDEX (`uuid`)");
        try {
            stmt.execute(); 
        } finally {
            stmt.close();
        }
    }
public static void addUniqueIndex ( Connection connection , String tableName ) throws Exception { PreparedStatement stmt = connection . prepareStatement ( "ALTER TABLE " + tableName + " ADD UNIQUE INDEX (`uuid`)" ) ; try { stmt . execute ( ) ; } finally { stmt . close ( ) ; } }
Makes the {@code uuid} column a unique index on the given table.
Makes the { @code uuid } column a unique index on the given table .