code: private void updateTable(Connection connection) throws DatabaseException {
          try {
  			// Add the SOURCEHISTORYID column to the db if necessary
  			if (!DbUtils.hasColumn(connection, TABLE_NAME, SOURCEHISTORYID)) {
  			    DbUtils.execute(connection, DbSQL.getSQL("alert.ps.addsourcehistoryid"));
  			}
  			
  			// Add the ATTACK column to the db if necessary
  			if (!DbUtils.hasColumn(connection, TABLE_NAME, ATTACK)) {
  			    DbUtils.execute(connection, DbSQL.getSQL("alert.ps.addattack"));
  			}
  			
  			if (!DbUtils.hasColumn(connection, TABLE_NAME, EVIDENCE)) {
  				// Evidence, cweId and wascId all added at the same time
  			    DbUtils.execute(connection, DbSQL.getSQL("alert.ps.addevidence"));
  			    DbUtils.execute(connection, DbSQL.getSQL("alert.ps.addcweid"));
  			    DbUtils.execute(connection, DbSQL.getSQL("alert.ps.addwascid"));
  			}
  			
  			if (!DbUtils.hasIndex(connection, TABLE_NAME, ALERT_INDEX)) {
  				// this speads up session loading
  				DbUtils.execute(connection, DbSQL.getSQL("alert.ps.addalertindex"));
  			}
  
  			if (!DbUtils.hasColumn(connection, TABLE_NAME, SOURCEID)) {
  				DbUtils.execute(connection, DbSQL.getSQL("alert.ps.addsourceid"));
  				DbUtils.execute(connection, DbSQL.getSQL("alert.ps.addsourceidindex"));
  			}
  		} catch (SQLException e) {
  			throw new DatabaseException(e);
  		}
          
      }
docs: ZAP: Added the method.