code: func (ls *LocalStore) Migrate() error {
  	actualDbSchema, err := ls.DbStore.GetSchema()
  	if err != nil {
  		log.Error(err.Error())
  		return err
  	}
  
  	if actualDbSchema == CurrentDbSchema {
  		return nil
  	}
  
  	log.Debug("running migrations for", "schema", actualDbSchema, "runtime-schema", CurrentDbSchema)
  
  	if actualDbSchema == DbSchemaNone {
  		ls.migrateFromNoneToPurity()
  		actualDbSchema = DbSchemaPurity
  	}
  
  	if err := ls.DbStore.PutSchema(actualDbSchema); err != nil {
  		return err
  	}
  
  	if actualDbSchema == DbSchemaPurity {
  		if err := ls.migrateFromPurityToHalloween(); err != nil {
  			return err
  		}
  		actualDbSchema = DbSchemaHalloween
  	}
  
  	if err := ls.DbStore.PutSchema(actualDbSchema); err != nil {
  		return err
  	}
  	return nil
  }
docs: // Migrate checks the datastore schema vs the runtime schema and runs
  // migrations if they don't match