code: public boolean addIndexToTable (Connection conn, String table, List<String> columns,
                                      String ixName, boolean unique) throws SQLException
      {
          if (tableContainsIndex(conn, table, ixName)) {
              return false;
          }
          ixName = (ixName != null ? ixName :
                    StringUtil.join(columns.toArray(new String[columns.size()]), "_"));
  
          StringBuilder update = new StringBuilder("CREATE ");
          if (unique) {
              update.append("UNIQUE ");
          }
          update.append("INDEX ").append(indexSQL(ixName)).append(" ON ").
              append(tableSQL(table)).append(" (");
          appendColumns(columns, update);
          update.append(")");
  
          executeQuery(conn, update.toString());
          log("Database index '" + ixName + "' added to table '" + table + "'");
          return true;
      }
docs: from DatabaseLiaison