Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public static performUpgrade(pathname: string): DbResult {
const nativeDb = new IModelHost.platform.DgnDb();
const res = nativeDb.openIModel(pathname, OpenMode.ReadWrite, IModelJsNative.UpgradeOptions.Upgrade);
if (DbResult.BE_SQLITE_OK === res)
nativeDb.closeIModel();
return res;
}