code: func migrateProcessData(tx *postgres.DBTx) error {
  	type Release struct {
  		ID string
  
  		// use map[string]interface{} for process types so we can just
  		// update Volumes and Data and leave other fields untouched
  		Processes map[string]map[string]interface{}
  	}
  
  	var releases []Release
  	rows, err := tx.Query("SELECT release_id, processes FROM releases")
  	if err != nil {
  		return err
  	}
  	defer rows.Close()
  	for rows.Next() {
  		var release Release
  		if err := rows.Scan(&release.ID, &release.Processes); err != nil {
  			return err
  		}
  		releases = append(releases, release)
  	}
  	if err := rows.Err(); err != nil {
  		return err
  	}
  
  	for _, release := range releases {
  		for typ, proc := range release.Processes {
  			v, ok := proc["data"]
  			if !ok {
  				continue
  			}
  			data, ok := v.(bool)
  			if !ok || !data {
  				continue
  			}
  			proc["volumes"] = []struct {
  				Path string `json:"path"`
  			}{
  				{Path: "/data"},
  			}
  			delete(proc, "data")
  			release.Processes[typ] = proc
  		}
  
  		// save the processes back to the db
  		if err := tx.Exec("UPDATE releases SET processes = $1 WHERE release_id = $2", release.Processes, release.ID); err != nil {
  			return err
  		}
  	}
  	return nil
  }
docs: // migrateProcessData populates ProcessType.Volumes if ProcessType.Data is set