private void initPackedDatabase(ResourceFile packedDBfile, OpenMode openMode,
			TaskMonitor monitor) throws CancelledException, IOException {
		Long txId = dbHandle.startTransaction();
		try {
			init(openMode, monitor);

			if (openMode != OpenMode.CREATE && hasDataOrganizationChange(true)) {
				// check for data organization change with possible upgrade
				handleDataOrganizationChange(openMode, monitor);
			}

			if (openMode == OpenMode.UPGRADE) {
				migrateOldFlexArrayComponentsIfRequired(monitor);

				Msg.showInfo(this, null, "Archive Upgraded",
					"Data type archive has been upgraded: " + packedDBfile.getName());
			}
		}
		catch (VersionException e) {
			if (openMode == OpenMode.UPDATE && e.isUpgradable()) {
				// Try again with UPGRADE mode
				dbHandle.endTransaction(txId, true);
				txId = null;
				initPackedDatabase(packedDBfile, OpenMode.UPGRADE, monitor);
			}
			else {
				// Unable to handle required upgrade
				throw new IOException(e);
			}
		}
		finally {
			if (txId != null) {
				dbHandle.endTransaction(txId, true);
			}
		}
	}
Constructor for a data-type manager backed by a packed database file. When
opening for UPDATE an automatic upgrade will be performed if required.
NOTE: Default DataOrganization will be used for new archive.

@param packedDBfile packed datatype archive file (i.e., *.gdt resource).
@param openMode     open mode CREATE, READ_ONLY or UPDATE 
@param monitor task monitor
@throws IOException a low-level IO error. This exception may also be thrown
                    when a version error occurs (cause is VersionException).
@throws CancelledException if task cancelled
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/DataTypeManagerDB.java