Carry out the upgrade.
764164
def do_upgrade():
    """"""
    op.alter_column(
        table_name='knwKBRVAL',
        column_name='id_knwKB',
        type_=db.MediumInteger(8, unsigned=True),
        existing_nullable=False,
        existing_server_default='0'
    )
613741
def upgrade(yes, dry_run, patches):
    
    patcher = _get_mongopatcher()
    if dry_run:
        patcher.discover_and_apply(directory=patches, dry_run=dry_run)
    else:
        if (yes or prompt_bool("Are you sure you want to alter %s" %
                               green(patcher.db))):
            patcher.discover_and_apply(patches)
        else:
            raise SystemExit('You changed your mind, exiting...')
511467
def __update_upgrades_table(self, delta):
        """"""

        query = """
        INSERT INTO {} (
            --id,
            version,
            description,
            type,
            script,
            checksum,
            installed_by,
            --installed_on,
            execution_time,
            success
        ) VALUES(
            '{}',
            '{}',
            {},
            '{}',
            '{}',
            '{}',
            1,
            TRUE
        ) """.format(
            self.upgrades_table, delta.get_version(), delta.get_name(),
            delta.get_type(), delta.get_file(), delta.get_checksum(),
            self.__get_dbuser())

        self.cursor.execute(query)
        self.connection.commit()
304992
def upgradeUpload(self, file):
        """"""
        files = {'upfile': open(file, 'rb')}
        return self.__post_files('/upgrade/upload',
                                 files=files)
356664
public function upgrade(): void
    {
        // This table was previously created by the googlemap module in 1.7.9.
        // These migrations are now part of the core code.

        if (!DB::schema()->hasTable('placelocation')) {
            DB::schema()->create('placelocation', static function (Blueprint $table): void {
                $table->integer('pl_id')->primary();
                $table->integer('pl_parent_id');
                $table->integer('pl_level');
                $table->string('pl_place', 255);
                $table->string('pl_long', 30)->nullable();
                $table->string('pl_lati', 30)->nullable();
                $table->integer('pl_zoom')->nullable();
                $table->string('pl_icon', 255)->nullable();

                $table->index('pl_place');
                $table->unique(['pl_parent_id', 'pl_place']);
            });
        }

        if (DB::schema()->hasColumn('placelocation', 'pl_media')) {
            DB::schema()->table('placelocation', static function (Blueprint $table): void {
                $table->dropColumn('pl_media');
                $table->dropColumn('sv_long');
                $table->dropColumn('sv_lati');
                $table->dropColumn('sv_bearing');
                $table->dropColumn('sv_elevation');
                $table->dropColumn('sv_zoom');
            });
        }
    }
1121608
def upgrade(directory=None, revision='head', sql=False, tag=None, x_arg=None):
    """"""
    config = current_app.extensions['migrate'].migrate.get_config(directory,
                                                                  x_arg=x_arg)
    command.upgrade(config, revision, sql=sql, tag=tag)
135407
def upgrade():
    """"""
    op.drop_constraint(u'fk_access_actionsusers_user_id_accounts_user',
                       'access_actionsusers', type_='foreignkey')
    op.drop_index(op.f('ix_access_actionsusers_user_id'),
                  table_name='access_actionsusers')

    op.alter_column('access_actionsusers', 'user_id', nullable=False,
                    existing_type=sa.Integer())

    op.create_index(op.f('ix_access_actionsusers_user_id'),
                    'access_actionsusers', ['user_id'], unique=False)
    op.create_foreign_key(op.f('fk_access_actionsusers_user_id_accounts_user'),
                          'access_actionsusers', 'accounts_user', ['user_id'],
                          ['id'], ondelete='CASCADE')
236671
def upgrade():
    """"""
    if op._proxy.migration_context.dialect.name == 'postgresql':
        op.alter_column(
            'records_metadata',
            'json',
            type_=sa.dialects.postgresql.JSONB,
            postgresql_using='json::text::jsonb'
        )
901711
def apt_upgrade(options=None, fatal=False, dist=False):
    """"""
    if options is None:
        options = ['--option=Dpkg::Options::=--force-confold']

    cmd = ['apt-get', '--assume-yes']
    cmd.extend(options)
    if dist:
        cmd.append('dist-upgrade')
    else:
        cmd.append('upgrade')
    log("Upgrading with options: {}".format(options))
    _run_apt_command(cmd, fatal)
944748
public function upgradeCoreData()
    {
        $entity = $this->getPackageEntity();
        if ($entity !== null) {
            $em = $this->app->make(EntityManagerInterface::class);
            $entity->setPackageName($this->getPackageName());
            $entity->setPackageDescription($this->getPackageDescription());
            $entity->setPackageVersion($this->getPackageVersion());
            $em->persist($entity);
            $em->flush();
        }
    }
935845
function upgrade(): Result {
    $composer = PHP_OS_FAMILY == 'Windows' ? 'php '.escapeshellarg('C:\Program Files\PHP\share\composer.phar') : 'composer';
    return $this->taskExecStack()
      ->exec('git reset --hard')
      ->exec('git fetch --all --prune')
      ->exec('git pull --rebase')
      ->exec("$composer update --no-interaction")
      ->run();
  }
479247
def upgrade():
    """"""
    op.create_table(
        'communities_community',
        sa.Column('created', sa.DateTime(), nullable=False),
        sa.Column('updated', sa.DateTime(), nullable=False),
        sa.Column('id', sa.String(length=100), nullable=False),
        sa.Column('id_user', sa.Integer(), nullable=False),
        sa.Column('title', sa.String(length=255), nullable=False),
        sa.Column('description', sa.Text(), nullable=False),
        sa.Column('page', sa.Text(), nullable=False),
        sa.Column('curation_policy', sa.Text(), nullable=False),
        sa.Column('last_record_accepted', sa.DateTime(), nullable=False),
        sa.Column('logo_ext', sa.String(length=4), nullable=True),
        sa.Column('ranking', sa.Integer(), nullable=False),
        sa.Column('fixed_points', sa.Integer(), nullable=False),
        sa.Column('deleted_at', sa.DateTime(), nullable=True),
        sa.ForeignKeyConstraint(['id_user'], [u'accounts_user.id'], ),
        sa.PrimaryKeyConstraint('id')
    )
    op.create_table(
        'communities_community_record',
        sa.Column('created', sa.DateTime(), nullable=False),
        sa.Column('updated', sa.DateTime(), nullable=False),
        sa.Column('id_community', sa.String(length=100), nullable=False),
        sa.Column('id_record', sqlalchemy_utils.types.uuid.UUIDType(),
                  nullable=False),
        sa.Column('id_user', sa.Integer(), nullable=True),
        sa.Column('expires_at', sa.DateTime(), nullable=True),
        sa.ForeignKeyConstraint(
            ['id_community'], ['communities_community.id'],
            name='fk_communities_community_record_id_community',
        ),
        sa.ForeignKeyConstraint(['id_record'], [u'records_metadata.id'], ),
        sa.ForeignKeyConstraint(['id_user'], [u'accounts_user.id'], ),
        sa.PrimaryKeyConstraint('id_community', 'id_record')
    )
    op.create_table(
        'communities_featured_community',
        sa.Column('created', sa.DateTime(), nullable=False),
        sa.Column('updated', sa.DateTime(), nullable=False),
        sa.Column('id', sa.Integer(), nullable=False),
        sa.Column('id_community', sa.String(length=100), nullable=False),
        sa.Column('start_date', sa.DateTime(), nullable=False),
        sa.ForeignKeyConstraint(
            ['id_community'], [u'communities_community.id'],
            name='fk_communities_featured_community_id_community',
        ),
        sa.PrimaryKeyConstraint('id')
    )
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');
            });
        }
    }
267990
def upgrade(self):
        
        for pkg in self.upgrade_all:
            check_md5(pkg_checksum(pkg, "slack_patches"), self.patch_path + pkg)
            pkg_ver = "{0}-{1}".format(split_package(pkg)[0],
                                       split_package(pkg)[1])
            if find_package(split_package(pkg)[0] + self.meta.sp,
                            self.meta.pkg_path):
                print("[ {0}upgrading{1} ] --> {2}".format(
                    self.meta.color["YELLOW"], self.meta.color["ENDC"],
                    pkg[:-4]))
                PackageManager((self.patch_path + pkg).split()).upgrade(
                    "--install-new")
                self.upgraded.append(pkg_ver)
            else:
                print("[ {0}installing{1} ] --> {2}".format(
                    self.meta.color["GREEN"], self.meta.color["ENDC"],
                    pkg[:-4]))
                PackageManager((self.patch_path + pkg).split()).upgrade(
                    "--install-new")
                self.installed.append(pkg_ver)
114742
def _upgrades(self, sid, transport):
        """"""
        if not self.allow_upgrades or self._get_socket(sid).upgraded or \
                self._async['websocket'] is None or transport == 'websocket':
            return []
        return ['websocket']
869081
def upgrade(self, package, force=False):
        """"""
        self.install(package, upgrade=True, force=force)
546745
def upgrade():
    """"""
    op.drop_constraint('fk_oauth2server_client_user_id_accounts_user',
                       'oauth2server_client', type_='foreignkey')
    op.create_foreign_key(op.f('fk_oauth2server_client_user_id_accounts_user'),
                          'oauth2server_client', 'accounts_user', ['user_id'],
                          ['id'], ondelete='CASCADE')
    op.create_index(op.f('ix_oauth2server_client_user_id'),
                    'oauth2server_client', ['user_id'], unique=False)
    op.drop_constraint('fk_oauth2server_token_user_id_accounts_user',
                       'oauth2server_token', type_='foreignkey')
    op.create_foreign_key(op.f('fk_oauth2server_token_user_id_accounts_user'),
                          'oauth2server_token', 'accounts_user', ['user_id'],
                          ['id'], ondelete='CASCADE')
    op.create_index(op.f('ix_oauth2server_token_user_id'),
                    'oauth2server_token', ['user_id'], unique=False)
    op.drop_constraint('fk_oauth2server_token_client_id_oauth2server_client',
                       'oauth2server_token', type_='foreignkey')
    op.create_foreign_key(
        op.f('fk_oauth2server_token_client_id_oauth2server_client'),
        'oauth2server_token', 'oauth2server_client', ['client_id'],
        ['client_id'], ondelete='CASCADE')
    op.create_index(op.f('ix_oauth2server_token_client_id'),
                    'oauth2server_token', ['client_id'], unique=False)