Upgrade a table leaf delta.
439789
private void upgradeDelta(TableEntry10 table, 
                            TableUpgrade upgradeTable,
                            Page10 page,
                            Delta10 delta)
    throws IOException
  {
    try (ReadStream is = openRead(page.segment().address(),
                                  page.segment().length())) {
      is.position(delta.address());
      
      long tail = delta.address() + delta.length();
      
      while (is.position() < tail) {
        upgradeDelta(is, table, upgradeTable, page);
      }
    }
  }
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)
284225
def clone(self):
        """"""
        return Leaf(self.type, self.value,
                    (self.prefix, (self.lineno, self.column)),
                    fixers_applied=self.fixers_applied)
1222132
public function upgrade()
    {
        $this->upgradeDatabase();

        // now we refresh all blocks
        $manager = new Manager($this->app);
        $items = $manager->driver('block_type')->getItems($this->getPackageEntity());
        foreach ($items as $item) {
            $item->refresh();
        }

        Localization::clearCache();
    }
511098
public function modifyTable()
    {
        foreach ($this->getSingleColumns() as $column)
        {
            if (!$this->getTable()->containsColumn($column))
            {
                $this->getTable()->addColumn(array(
                	'name' => $column,
                    'type' => 'VARCHAR',
                    'size' => '255',
                ));
            }
        }
    }
621746
public function upgradeDatabase()
    {
        $this->refreshDatabaseTables([
            'FailedLoginAttempts',
            'LoginControlIpRanges',
        ]);
        $this->connection->executeQuery('DROP TABLE IF EXISTS SignupRequests');
        $this->connection->executeQuery('DROP TABLE IF EXISTS UserBannedIPs');

        // Add the new dashboard page to show IP ranges
        $this->createSinglePage('/dashboard/system/permissions/blacklist/range', 'IP Range', ['exclude_nav' => true]);
    }
247934
private void updateTypeCounts(T type, int delta) {
        if (!typeCounts.containsKey(type)) {
            assert delta > 0 
                : "removing edge type that was not originally present";
            typeCounts.put(type, delta);
        }
        else {
            int curCount = typeCounts.get(type);
            int newCount = curCount + delta;
            assert newCount >= 0 
                : "removing edge type that was not originally present";
            if (newCount == 0)
                typeCounts.remove(type);
            else
                typeCounts.put(type, newCount);
        }
    }
1344657
def get_and_add(self, delta):
        '''
        
        '''
        with self._lock.exclusive:
            oldval = self._value
            self._value += delta
            return oldval
1269854
def _upgrade_db(self):
        """"""
        migration_path = "_data/migrations"
        sqlite3.connect(self._db_path).close()    # ensure that it exists
        db_url = "sqlite:///" + self._db_path
        backend = yoyo.get_backend(db_url)
        migration_dir = pkg_resources.resource_filename(__package__, migration_path)
        migrations = yoyo.read_migrations(migration_dir)
        assert len(migrations) > 0, "no migration scripts found -- wrong migraion path for " + __package__
        migrations_to_apply = backend.to_apply(migrations)
        backend.apply_migrations(migrations_to_apply)
672963
public void updateMorphTime(float delta) {
		for (int i=0;i<figures.size();i++) {
			Figure figure = (Figure) figures.get(i);
			MorphShape shape = (MorphShape) figure.getShape();
			shape.updateMorphTime(delta);
		}
	}
264343
void addDelta(TableKelp db, int offset, int length)
  {
    if (_delta == null) {
      _delta = new int[2 * db.getDeltaMax()];
    }
    
    _delta[_deltaTail++] = offset;
    _delta[_deltaTail++] = length;
  }
699865
protected void updateAndRender(int delta) throws SlickException {
		if (smoothDeltas) {
			if (getFPS() != 0) {
				delta = 1000 / getFPS();
			}
		}
		
		input.poll(width, height);
	
		Music.poll(delta);
		if (!paused) {
			storedDelta += delta;
			
			if (storedDelta >= minimumLogicInterval) {
				try {
					if (maximumLogicInterval != 0) {
						long cycles = storedDelta / maximumLogicInterval;
						for (int i=0;i<cycles;i++) {
							game.update(this, (int) maximumLogicInterval);
						}
						
						int remainder = (int) (storedDelta % maximumLogicInterval);
						if (remainder > minimumLogicInterval) {
							game.update(this, (int) (remainder % maximumLogicInterval));
							storedDelta = 0;
						} else {
							storedDelta = remainder;
						}
					} else {
						game.update(this, (int) storedDelta);
						storedDelta = 0;
					}
					
				} catch (Throwable e) {
					Log.error(e);
					throw new SlickException("Game.update() failure - check the game code.");
				}
			}
		} else {
			game.update(this, 0);
		}
		
		if (hasFocus() || getAlwaysRender()) {
			if (clearEachFrame) {
				GL.glClear(SGL.GL_COLOR_BUFFER_BIT | SGL.GL_DEPTH_BUFFER_BIT);
			} 
			
			GL.glLoadIdentity();
			
			graphics.resetTransform();
			graphics.resetFont();
			graphics.resetLineWidth();
			graphics.setAntiAlias(false);
			try {
				game.render(this, graphics);
			} catch (Throwable e) {
				Log.error(e);
				throw new SlickException("Game.render() failure - check the game code.");
			}
			graphics.resetTransform();
			
			if (showFPS) {
				defaultFont.drawString(10, 10, "FPS: "+recordedFPS);
			}
			
			GL.flush();
		}
		
		if (targetFPS != -1) {
			Display.sync(targetFPS);
		}
	}
1201083
def upgrade():
    """"""
    op.create_table(
        'crawler_job',
        sa.Column('id', sa.Integer, primary_key=True, autoincrement=True),
        sa.Column('job_id', UUIDType, index=True),
        sa.Column('spider', sa.String(255), index=True),
        sa.Column('workflow', sa.String(255), index=True),
        sa.Column('results', sa.Text, nullable=True),
        sa.Column(
            'status',
            ChoiceType(JobStatus, impl=sa.String(10)),
            nullable=False
        ),
        sa.Column('logs', sa.Text, nullable=True),
        sa.Column(
            'scheduled',
            sa.DateTime,
            default=datetime.now,
            nullable=False,
            index=True
        )
    )

    op.create_table(
        'crawler_workflows_object',
        sa.Column('job_id', UUIDType, primary_key=True),
        sa.Column(
            'object_id',
            sa.Integer,
            sa.ForeignKey(
                'workflows_object.id',
                ondelete="CASCADE",
                onupdate="CASCADE",
            ),
            primary_key=True
        )
    )
526008
def _update_terminal_region(self, tree, terminal_regions, leaf, X, y,
                                residual, pred, sample_weight):
        """"""
640169
def update_max_progress(self):
        
        self.update_progress()
        if self.leafnode:
            self.max_leaf_progress = self.progress
        else:
            self.max_leaf_progress = max(self.lower.max_leaf_progress, self.greater.max_leaf_progress)
374863
def upgrade(directory, sql, tag, x_arg, revision):
    """"""
    _upgrade(directory, revision, sql, tag, x_arg)
218514
private void updateDOTable() throws InstallationFailedException {
        if (_db.equals(InstallOptions.INCLUDED)) {
            return; // no need to update embedded
        }
        try {
            Connection conn = getConnection();
            DatabaseMetaData dmd = conn.getMetaData();
            ResultSet rs = dmd.getTables(null, null, "do%", null);
            while (rs.next()) {
                if (rs.getString("TABLE_NAME").equals("do")) {
                    Statement stmt = conn.createStatement();
                    stmt.execute("ALTER TABLE do RENAME TO dobj");
                    System.out.println("Renamed table 'do' to 'dobj'.");
                    stmt.close();
                }
            }
            rs.close();
        } catch (Exception e) {
            throw new InstallationFailedException(e.getMessage(), e);
        }
    }