(script plugin.MigrationScript)
| 372 | } |
| 373 | |
| 374 | func hashScript(script plugin.MigrationScript) string { |
| 375 | hasher := md5.New() |
| 376 | _, err := hasher.Write([]byte(fmt.Sprintf("%s:%v", script.Name(), script.Version()))) |
| 377 | if err != nil { |
| 378 | panic(err) |
| 379 | } |
| 380 | return strings.ToUpper(hex.EncodeToString(hasher.Sum(nil))) |
| 381 | } |
no test coverage detected