code: func writeMigrationSourceFile(dir, source, driver, connStr string, latestTime int64, latestName string, task string) {
  	changeDir(dir)
  	if f, err := os.OpenFile(source, os.O_CREATE|os.O_EXCL|os.O_RDWR, 0666); err != nil {
  		beeLogger.Log.Fatalf("Could not create file: %s", err)
  	} else {
  		content := strings.Replace(MigrationMainTPL, "{{DBDriver}}", driver, -1)
  		content = strings.Replace(content, "{{DriverRepo}}", driverImportStatement(driver), -1)
  		content = strings.Replace(content, "{{ConnStr}}", connStr, -1)
  		content = strings.Replace(content, "{{LatestTime}}", strconv.FormatInt(latestTime, 10), -1)
  		content = strings.Replace(content, "{{LatestName}}", latestName, -1)
  		content = strings.Replace(content, "{{Task}}", task, -1)
  		if _, err := f.WriteString(content); err != nil {
  			beeLogger.Log.Fatalf("Could not write to file: %s", err)
  		}
  		utils.CloseFile(f)
  	}
  }
docs: // writeMigrationSourceFile create the source file based on MIGRATION_MAIN_TPL