code: func Migrate(d Driver, migrations []Migration, infoChan chan MigrationInfo) error {
  	mutex.Lock()
  	defer mutex.Unlock()
  
  	err := d.Create()
  
  	if err != nil {
  		return err
  	}
  
  	err = Validate(d, migrations)
  
  	if err != nil {
  		return err
  	}
  
  	planned, err := planMigration(d, migrations)
  
  	if err != nil {
  		return err
  	}
  
  	for _, migration := range planned {
  		dur, err := d.Exec(migration.Script)
  
  		if err != nil {
  			notify(err, migration, infoChan)
  			return err
  		}
  
  		err = d.Insert(MigrationRecord{
  			Version:       migration.Version,
  			Description:   migration.Description,
  			Checksum:      migration.Checksum(),
  			AppliedAt:     time.Now(),
  			ExecutionTime: dur,
  		})
  
  		notify(err, migration, infoChan)
  
  		if err != nil {
  			return err
  		}
  
  	}
  
  	return nil
  }
docs: // Migrate executes the missing migrations in database.