Complete the upgrade for local image storage with the given namespace.
161801
private void completeUpgradeImage(NamespaceInfo nsInfo) throws IOException {
    Preconditions.checkState(nsInfo.getNamespaceID() != 0,
        "can't upgrade with uninitialized namespace info: %s",
        nsInfo.toColonSeparatedString());
    LOG.info("Completing Upgrading image " + this.getJournalId()
        + " with namespace info: (" + nsInfo.toColonSeparatedString() + ")");
    // Do something about checkpoint image digests.

    imageStorage.completeUpgrade(nsInfo);
  }
1317671
public function upgrade(): void
    {
        // These tables were created by webtrees 1.x, and may not exist if we first installed webtrees 2.x
        DB::schema()->dropIfExists('site_access_rule');
        DB::schema()->dropIfExists('next_id');

        // Split the media table into media/media_file so that we can store multiple media
        // files in each media object.
        DB::schema()->create('media_file', static function (Blueprint $table): void {
            $table->integer('id', true);
            $table->string('m_id', 20);
            $table->integer('m_file');
            $table->string('multimedia_file_refn', 248); // GEDCOM only allows 30 characters
            $table->string('multimedia_format', 4);
            $table->string('source_media_type', 15);
            $table->string('descriptive_title', 248);

            $table->index(['m_id', 'm_file']);
            $table->index(['m_file', 'm_id']);
            $table->index(['m_file', 'multimedia_file_refn']);
            $table->index(['m_file', 'multimedia_format']);
            $table->index(['m_file', 'source_media_type']);
            $table->index(['m_file', 'descriptive_title']);
        });

        if (DB::schema()->hasColumn('media', 'm_filename')) {
            (new Builder(DB::connection()))->from('media_file')->insertUsing([
                'm_id',
                'm_file',
                'multimedia_file_refn',
                'multimedia_format',
                'source_media_type',
                'descriptive_title',
            ], static function (Builder $query): void {
                $query->select([
                    'm_id',
                    'm_file',
                    'm_filename',
                    'm_ext',
                    'm_type',
                    'm_titl',
                ])->from('media');
            });

            // SQLite can only drop one column at a time.
            DB::schema()->table('media', static function (Blueprint $table): void {
                $table->dropColumn('m_filename');
            });
            DB::schema()->table('media', static function (Blueprint $table): void {
                $table->dropColumn('m_ext');
            });
            DB::schema()->table('media', static function (Blueprint $table): void {
                $table->dropColumn('m_type');
            });
            DB::schema()->table('media', static function (Blueprint $table): void {
                $table->dropColumn('m_titl');
            });
        }
    }
412842
public function upgradeDatabase()
    {
        $db = $this->connection;
        $db->executeQuery("UPDATE FileImageThumbnailPaths SET thumbnailFormat = ? WHERE thumbnailFormat = '' AND (path LIKE '%.jpg' OR path LIKE '%.jpeg' OR path LIKE '%.pjpg' OR path LIKE '%.pjpeg')", [BitmapFormat::FORMAT_JPEG]);
        $db->executeQuery("UPDATE FileImageThumbnailPaths SET thumbnailFormat = ? WHERE thumbnailFormat = ''", [BitmapFormat::FORMAT_PNG]);
    }
295460
private DefaultInstalledExtension addInstalledExtension(LocalExtension localExtension, String namespace,
        boolean valid)
    {
        DefaultInstalledExtension installedExtension = this.extensions.get(localExtension.getId());
        if (installedExtension == null) {
            installedExtension = new DefaultInstalledExtension(localExtension, this);
        }

        installedExtension.setInstalled(true, namespace);
        installedExtension.setValid(namespace, valid);

        addInstalledExtension(installedExtension, namespace);

        return installedExtension;
    }
405014
def _local_upload(self, filepath, remove=False):
        """"""
        if os.path.isfile(filepath):
            filename = os.path.basename(os.path.abspath(filepath))
            if filename and self.__isValidFilename(filename):
                suffix = self.__getFilenameSuffix(filename)
                try:
                    self.__unpack_tgz(os.path.abspath(filepath)) if self.__isValidTGZ(suffix) else self.__unpack_zip(os.path.abspath(filepath))
                finally:
                    if remove is True:
                        os.remove(filepath)
            else:
                raise InstallError("Invalid Filename")
        else:
            raise InstallError("Invalid Filepath")
634496
public void upgrade(ConnectionProtocol upgrade)
  {
    connHttp().request(upgrade);
    //_upgrade = upgrade;
    
    //upgrade.start();
    
    requestHttp().upgrade();
    
    _state = _state.toUpgrade();
    
    requestHttp().connTcp().proxy().requestWake();
  }
1081987
def update(self, newinfo):
        ''''''
        self.imgstr = newinfo.imgstr
        self.width = newinfo.width
        self.height = newinfo.height
        if self.imgpanel is not None:
            self.imgpanel.set_image(self.img())
1338422
private void addInstalledExtension(DefaultInstalledExtension installedExtension, String namespace)
    {
        addCachedExtension(installedExtension);

        boolean isValid = installedExtension.isValid(namespace);

        // Register the extension in the installed extensions for the provided namespace
        addInstalledFeatureToCache(installedExtension.getId(), namespace, installedExtension, isValid);

        // Add virtual extensions
        for (ExtensionId feature : installedExtension.getExtensionFeatures()) {
            addInstalledFeatureToCache(feature, namespace, installedExtension, isValid);
        }

        if (this.updateBackwardDependencies) {
            // Recalculate backward dependencies index
            updateMissingBackwardDependencies();
        }
    }
1348042
function upgrade() {
  if (!this.active) {
    return this;
  }
  return this.call(
    'system.listComponents',
    this.localComponents,
    (function(err, result) {
      if (!err && typeof result === 'object') {
        this.remoteComponents = result;
        this.remoteComponents['system._upgraded'] = true;
      }
    }).bind(this)
  );
}
1023840
def upgrade():
    """"""
    op.create_index(op.f('ix_access_actionsroles_role_id'),
                    'access_actionsroles', ['role_id'], unique=False)
    op.drop_constraint(u'fk_access_actionsroles_role_id_accounts_role',
                       'access_actionsroles', type_='foreignkey')
    op.create_foreign_key(op.f('fk_access_actionsroles_role_id_accounts_role'),
                          'access_actionsroles', 'accounts_role', ['role_id'],
                          ['id'], ondelete='CASCADE')
    op.create_index(op.f('ix_access_actionsusers_user_id'),
                    'access_actionsusers', ['user_id'], unique=False)
    op.drop_constraint(u'fk_access_actionsusers_user_id_accounts_user',
                       'access_actionsusers', type_='foreignkey')
    op.create_foreign_key(op.f('fk_access_actionsusers_user_id_accounts_user'),
                          'access_actionsusers', 'accounts_user', ['user_id'],
                          ['id'], ondelete='CASCADE')
1059547
def install_required(f):
    

    @wraps(f)
    def wrapped(self, *args, **kwargs):
        if self.directory.new:
            raise SprinterException("Namespace %s is not yet installed!" % self.namespace)
        return f(self, *args, **kwargs)
    return wrapped
341038
private void doUpgradeJournal(NamespaceInfo nsInfo) throws IOException {
    Preconditions.checkState(nsInfo.getNamespaceID() != 0,
        "can't upgrade with uninitialized namespace info: %s",
        nsInfo.toColonSeparatedString());
    LOG.info("Upgrading journal " + this.getJournalId()
        + " with namespace info: (" + nsInfo.toColonSeparatedString() + ")");
    journalStorage.doUpgrade(nsInfo);

    copyMetaFilesForUpgrade();
    refreshCachedData();
  }
1098090
def _upgrade(system_image, kickstart_image, issu, **kwargs):
    '''
    
    '''
    si = system_image
    ki = kickstart_image
    dev = 'bootflash'
    cmd = 'terminal dont-ask ; install all'

    if ki is None:
        logmsg = 'Upgrading device using combined system/kickstart image.'
        logmsg += '\nSystem Image: {}'.format(si)
        cmd = cmd + ' nxos {0}:{1}'.format(dev, si)
        if issu:
            cmd = cmd + ' non-disruptive'
    else:
        logmsg = 'Upgrading device using separate system/kickstart images.'
        logmsg += '\nSystem Image: {}'.format(si)
        logmsg += '\nKickstart Image: {}'.format(ki)
        if not issu:
            log.info('Attempting upgrade using force option')
            cmd = cmd + ' force'
        cmd = cmd + ' kickstart {0}:{1} system {0}:{2}'.format(dev, ki, si)

    if issu:
        logmsg += '\nIn Service Software Upgrade/Downgrade (non-disruptive) requested.'
    else:
        logmsg += '\nDisruptive Upgrade/Downgrade requested.'

    log.info(logmsg)
    log.info("Begin upgrade using command: '%s'", cmd)

    kwargs.update({'timeout': kwargs.get('timeout', 900)})
    error_pattern_list = ['Another install procedure may be in progress']
    kwargs.update({'error_pattern': error_pattern_list})

    # Begin Actual Upgrade
    try:
        upgrade_result = __salt__['nxos.sendline'](cmd, **kwargs)
    except CommandExecutionError as e:
        upgrade_result = ast.literal_eval(e.message)
    except NxosError as e:
        if re.search('Code: 500', e.message):
            upgrade_result = e.message
        else:
            upgrade_result = ast.literal_eval(e.message)
    return _parse_upgrade_data(upgrade_result)
515544
function upgradeAllRegisteredInternal() {
    for (var n = 0; n < registeredComponents_.length; n++) {
      upgradeDomInternal(registeredComponents_[n].className);
    }
  }
852156
def upgrade():
    """"""
    op.create_table(
        'access_actionsroles',
        sa.Column('id', sa.Integer(), nullable=False),
        sa.Column('action', sa.String(length=80), nullable=True),
        sa.Column('exclude', sa.Boolean(name='exclude'), server_default='0',
                  nullable=False),
        sa.Column('argument', sa.String(length=255), nullable=True),
        sa.Column('role_id', sa.Integer(), nullable=False),
        sa.ForeignKeyConstraint(['role_id'], [u'accounts_role.id'], ),
        sa.PrimaryKeyConstraint('id'),
        sa.UniqueConstraint('action', 'exclude', 'argument', 'role_id',
                            name='access_actionsroles_unique')
    )
    op.create_index(
        op.f('ix_access_actionsroles_action'), 'access_actionsroles',
        ['action'], unique=False)
    op.create_index(
        op.f('ix_access_actionsroles_argument'), 'access_actionsroles',
        ['argument'], unique=False)
    op.create_table(
        'access_actionsusers',
        sa.Column('id', sa.Integer(), nullable=False),
        sa.Column('action', sa.String(length=80), nullable=True),
        sa.Column('exclude', sa.Boolean(name='exclude'), server_default='0',
                  nullable=False),
        sa.Column('argument', sa.String(length=255), nullable=True),
        sa.Column('user_id', sa.Integer(), nullable=True),
        sa.ForeignKeyConstraint(['user_id'], [u'accounts_user.id'], ),
        sa.PrimaryKeyConstraint('id'),
        sa.UniqueConstraint('action', 'exclude', 'argument', 'user_id',
                            name='access_actionsusers_unique')
    )
    op.create_index(
        op.f('ix_access_actionsusers_action'), 'access_actionsusers',
        ['action'], unique=False)
    op.create_index(
        op.f('ix_access_actionsusers_argument'), 'access_actionsusers',
        ['argument'], unique=False)
153880
private void addNameSpaceStorage(int nsID, NameSpaceSliceStorage nsStorage)
      throws IOException {
    if (!this.nsStorageMap.containsKey(nsID)) {
      this.nsStorageMap.put(nsID, nsStorage);
    }   
  }
173268
@Override
    public JsonObject upgrade(final JsonObject outdatedDBEntry, Map<File, JsonObject> dbSnapshot) {
        return rename(outdatedDBEntry, newName, path);
    }