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

Testing method support #7

Open
glerchundi opened this issue Jun 25, 2019 · 1 comment
Open

Testing method support #7

glerchundi opened this issue Jun 25, 2019 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@glerchundi
Copy link
Contributor

What do you think about adding a method that executes just after the migration step and before increasing the current migration version? Mainly to be sure that everything worked as expected.

Something like:

&migrator.Migration{
	Name: "my migration",
	Func: func(tx *sql.Tx) error {
		// add migration logic here.
	},
	TestFunc: func(tx *sql.Tx) error {
		// add testing logic here.
        },
}
@lopezator
Copy link
Owner

I think this could be a good idea.

It would be nice if you could test this functionality and provide feedback or examples of usage.

I'll be glad to add this if it proves to be useful for the regular user of the tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants