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

		AddressMap oldAddrMap = addrMap.getOldAddressMap();

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

			monitor.setMessage("Upgrading Instructions...");
			monitor.initialize(oldAdapter.getRecordCount() * 2);
			int count = 0;

			InstDBAdapter tmpAdapter = new InstDBAdapterV1(tmpHandle, addrMap, true);
			RecordIterator iter = oldAdapter.getRecords();
			while (iter.hasNext()) {
				monitor.checkCancelled();
				DBRecord rec = iter.next();
				Address addr = oldAddrMap.decodeAddress(rec.getKey());
				rec.setKey(addrMap.getKey(addr, true));
				tmpAdapter.putRecord(rec);
				monitor.setProgress(++count);
			}

			dbHandle.deleteTable(INSTRUCTION_TABLE_NAME);
			InstDBAdapter newAdapter = new InstDBAdapterV1(dbHandle, addrMap, true);

			iter = tmpAdapter.getRecords();
			while (iter.hasNext()) {
				monitor.checkCancelled();
				DBRecord rec = iter.next();
				newAdapter.putRecord(rec);
				monitor.setProgress(++count);
			}
			return newAdapter;
		}
		finally {
			tmpHandle.close();
		}
	}
Adapter that accesses the instruction table.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/code/InstDBAdapter.java