private static RelocationDBAdapter upgrade(DBHandle dbHandle, AddressMap addrMap,
			RelocationDBAdapter oldAdapter, TaskMonitor monitor)
			throws VersionException, IOException {

		AddressMap oldAddrMap = addrMap.getOldAddressMap();

		DBHandle tmpHandle = new DBHandle();
		try {
			tmpHandle.startTransaction();

			RelocationDBAdapter tmpAdapter = new RelocationDBAdapterV6(tmpHandle, addrMap, true);
			RecordIterator iter = oldAdapter.iterator();
			while (iter.hasNext()) {
				DBRecord rec = iter.next();
				// decode with old address map
				Address addr = oldAddrMap.decodeAddress(rec.getLongValue(ADDR_COL));
				BinaryCodedField values =
					new BinaryCodedField((BinaryField) rec.getFieldValue(VALUE_COL));
				tmpAdapter.add(addr, rec.getByteValue(FLAGS_COL), rec.getIntValue(TYPE_COL),
					values.getLongArray(), rec.getBinaryData(BYTES_COL),
					rec.getString(SYMBOL_NAME_COL));
			}

			dbHandle.deleteTable(TABLE_NAME);

			RelocationDBAdapterV6 newAdapter = new RelocationDBAdapterV6(dbHandle, addrMap, true);

			iter = tmpAdapter.iterator();
			while (iter.hasNext()) {
				DBRecord rec = iter.next();
				newAdapter.put(rec);
			}
			return newAdapter;
		}
		finally {
			tmpHandle.close();
		}
	}
FLAGS bit encoding:
  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
  |   |     length    |   status  |
 status: Relocation.Status enum index    
 length: Optional byte-length used when bytes is null (0..31)
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/reloc/RelocationDBAdapter.java