Skip to content

Commit

Permalink
Improve the migration regexp
Browse files Browse the repository at this point in the history
Allow creating tables with:

- lower case
- upper case
- number and dot
  • Loading branch information
iamralch committed Jul 27, 2021
1 parent 197268c commit b3e76d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sqlmigr/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/phogolabs/log"
)

var migrationRgxp = regexp.MustCompile(`CREATE TABLE IF NOT EXISTS\s*([a-z]+)\s*`)
var migrationRgxp = regexp.MustCompile(`CREATE TABLE IF NOT EXISTS\s*([a-zA-Z0-9\.]+)\s*`)

// Executor provides a group of operations that works with migrations.
type Executor struct {
Expand Down

0 comments on commit b3e76d9

Please sign in to comment.