Skip to content

Commit

Permalink
feat: prefix migration files with 1 upto 14 digits
Browse files Browse the repository at this point in the history
Slightly modified the migration file regexp to allow flexible width digit prefixes.
  • Loading branch information
burner-account committed Apr 16, 2023
1 parent 7cd855e commit b74b671
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion migrate/migrations.go
Expand Up @@ -157,7 +157,7 @@ func migrationFile() string {
return ""
}

var fnameRE = regexp.MustCompile(`^(\d{14})_([0-9a-z_\-]+)\.`)
var fnameRE = regexp.MustCompile(`^(\d{1,14})_([0-9a-z_\-]+)\.`)

func extractMigrationName(fpath string) (string, string, error) {
fname := filepath.Base(fpath)
Expand Down

0 comments on commit b74b671

Please sign in to comment.