func (r *Repo) upgradeSchema(ctx context.Context) (bool, error) {
	var updated bool
	for _, upgrade := range upgrades {
		u, err := upgrade(ctx, r)
		updated = updated || u
		if err != nil {
			return updated, err
		}
	}
	return updated, nil
}
// upgradeSchema updates the local schema, if necessary, and returns true if
// any updates were made.
//
// This should be run after a sync, and in case of updates, a sync should be
// re-run. This is to reduce the chance of a race condition with multiple
// clients doing a simultaneous update.
upgradeSchema updates the local schema, if necessary, and returns true if
any updates were made.

This should be run after a sync, and in case of updates, a sync should be
re-run. This is to reduce the chance of a race condition with multiple
clients doing a simultaneous update.
// upgradeSchema updates the local schema if necessary and returns true if // any updates were made . // // This should be run after a sync and in case of updates a sync should be // re - run . This is to reduce the chance of a race condition with multiple // clients doing a simultaneous update .
func (r *Repo) upgradeSchema(ctx context.Context) (bool, error) {
	var updated bool
	for _, upgrade := range upgrades {
		u, err := upgrade(ctx, r)
		updated = updated || u
		if err != nil {
			return updated, err
		}
	}
	return updated, nil
}
func ( r * Repo ) upgradeSchema ( ctx context . Context ) ( bool , error ) { var updated bool for _ , upgrade := range upgrades { u , err := upgrade ( ctx , r ) updated = updated || u if err != nil { return updated , err } } return updated , nil }
upgradeSchema updates the local schema, if necessary, and returns true if
any updates were made.
upgradeSchema updates the local schema if necessary and returns true if any updates were made .