-
Notifications
You must be signed in to change notification settings - Fork 77
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
Spring Boot Autoconfiguration and CLI for MyBatis Migrations #74
Comments
Hi @Bessonov . This is nice work! I'll try to answer some of your questions but am not exactly sure what you are asking in some cases:
|
@h3adache thank you for your quick response! Yeah, I know, my English isn't perfect :(
Basically, what I have done, is usage of Spring Boot capabilities to run in-app migrations and possibility to use produced jar as cli for migrations. I don't think it is useful in core, because it depends on Spring. But my suggestions would be: Decouple commands and operations further Exchange CommandLine.java with command line parsing library. Provide utilities to create
|
I actually thought about using jcommander when I was refactoring the options parsing but stayed away from it at the time because it was pretty new at the time and more importantly, I was trying to stay with the theme that we don't introduce too many external dependencies. If you look we currently only depend on mybatis (and of course any of it's transient dependencies). |
Interesting idea. |
@h3adache reduce external dependencies is right way to go. I can imagine to split mybatis migrations core (executor) from mybatis migrations cli (runs executor). So you can have both: reduced dependencies and reduced code for cli. And I can use both in my autoconfiguration. @harawata of course you can :) I support a little start-up and we switch now from liquibase to mybatis migrations. There some workflows, which we would like to implement:
On other side I know companies, which have different teams for development and database migrations. Output of script command from self-containing jar would be useful for them.
It depends. I assume always a developer know what he/she doing and don't expect working app if needed table doesn't here. For example with galera cluster schema can be migrated with zero downtime. But with RSU nodes must be migrated one by one. |
Hi,
thank you for your work. For my spring application I created an autoconfigration with cli support. I have a lot of questions now.
Before I push it to maven central I would like to ask you what do you think about move it to mybatis github organisation?
Is there a plan for high level API for commands like
script
andnew
?It's an error that
pending
command can't run migrations withoutchangelog
table (even if first script creates the table) andup
doesn't pick up old pending scripts?The text was updated successfully, but these errors were encountered: