Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permit custom migration table name to contain '.' #23

Closed
mirkoperillo opened this issue Mar 16, 2022 · 3 comments · Fixed by #26
Closed

Permit custom migration table name to contain '.' #23

mirkoperillo opened this issue Mar 16, 2022 · 3 comments · Fixed by #26

Comments

@mirkoperillo
Copy link
Contributor

mirkoperillo commented Mar 16, 2022

Currently it is impossible to create a migration table with name master.migrations for example.
The reason is the regexp that check the name

tableMatcher = regexp.MustCompile(`^[\w]+$`)

This can be useful when a Postgresql DB contains multiple schemas and you want to create migration table in a specific one.

I suggest to add '.' as a valid character
tableMatcher = regexp.MustCompile(^[\w\.]+$)

@markuswustenberg
Copy link
Member

Hey @mirkoperillo. That sounds reasonable. Would you like to submit a PR along with a test?

@mirkoperillo
Copy link
Contributor Author

@markuswustenberg yes, I'm interested.
I'm going to provide a PR asap

@markuswustenberg
Copy link
Member

@mirkoperillo Thanks again. 😊 I've just released v0.4.2 where your change is included.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants