-
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
migrate version fails on empty database #160
Comments
Thank you for the report, @Anonymous-Coward ! I have committed a fix. |
I would love to test this, but I'm using mybatis migrations through the maven plugin, and unfortunately don't have the time to set up a test env right now. But I'm happy to hear it's fixed - it will eventually get pushed to the maven plugin too, I suppose. |
As it's been a while since the last release, we released 3.3.7. The maven plugin hasn't been updated for a while as there has been no real change. <plugin>
<groupId>org.mybatis.maven</groupId>
<artifactId>migrations-maven-plugin</artifactId>
<version>1.1.3</version>
...
<dependencies>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-migrations</artifactId>
<version>3.3.7</version>
</dependency>
</dependencies>
</plugin> |
Just checked, 3.3.7 is not yet available on mvnrepository.com. Do you have a repo URL for me too, or will it get published soon? |
It takes a while for a new version to show up on mvnrepository.com as they have index interval (I guess). It's now visible. |
Steps to reproduce:
Expected results:
Actual results:
Background: in continuous integration setups, you don't always want to migrate to the latest version. The migrations in the source code repository may be well ahead of what needs to be deployed into a test environment, therefore you only update the database for that test environment to the database version corresponding to the app version that gets deployed there. That test environment may get reset to the initial state upon each deployment.
Workaround that works: first run migrate up, and only then run migrate version . But that's not nice or convenient, especially when having a lot of migrations between head and what needs to be deployed.
The text was updated successfully, but these errors were encountered: