@Override
	public void setProgram(ProgramDB p) {
		this.program = p;
		try {
			setProgramArchitecture(p, p.getSymbolTable().getVariableStorageManager(), false,
				TaskMonitor.DUMMY);

			// NOTE: Due to late manner in which program architecture is established, any
			// response to a data organization change must be handled during a language
			// upgrade and setLanguage
		}
		catch (CancelledException e) {
			throw new AssertException(e); // unexpected - no IO performed
		}
		catch (IOException e) {
			errHandler.dbError(e);
		}
		if (upgrade) {
			removeOldFileNameList();
		}
	}
Save the current data organization to facilitate future change detection and 
upgrades.  This method must be invoked by {@link ProgramDB} during the final
stage of program creation (i.e., openMode == CREATE).
@throws IOException if failure occured while saving data organization.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/ProgramDataTypeManager.java