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

Question: Is there a way to overwrite the scripts folder location? #258

Closed
ghevge opened this issue Aug 28, 2022 · 1 comment
Closed

Question: Is there a way to overwrite the scripts folder location? #258

ghevge opened this issue Aug 28, 2022 · 1 comment

Comments

@ghevge
Copy link

ghevge commented Aug 28, 2022

What I'm trying to achieve is to come up with 2 sets of migration scripts and somehow instruct mybatis migration to pick up the scripts from one folder or the other, depending on the schema that I'm instructing it to use.

I'm planning to use this functionality on a postgres DB instance on which I'll have multiple schema defined. Each schema will have slightly different table structures, that is why I will need 2 sets of scripts.

I can hack this functionality by duplicating the whole mybatis migrations folders structure, but it will be cleaner if I could just instruct the command to use one or the other set of scripts.

Any suggestions?

Thanks

@ghevge
Copy link
Author

ghevge commented Aug 28, 2022

Found the solution. There is an option called SCRIPTPATH that can be passed as a command line argument

@ghevge ghevge closed this as completed Aug 28, 2022
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

No branches or pull requests

1 participant