forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed Java migrations from different packages.
Fix quarkusio#32654
- Loading branch information
Showing
7 changed files
with
78 additions
and
58 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
extensions/flyway/deployment/src/test/java/db/migration/V1_0_1__Update.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package db.migration; | ||
|
||
import java.sql.Statement; | ||
|
||
import org.flywaydb.core.api.migration.BaseJavaMigration; | ||
import org.flywaydb.core.api.migration.Context; | ||
|
||
/** | ||
* Migration class for some testcases. | ||
*/ | ||
public class V1_0_1__Update extends BaseJavaMigration { | ||
@Override | ||
public void migrate(Context context) throws Exception { | ||
try (Statement statement = context.getConnection().createStatement()) { | ||
statement.executeUpdate("INSERT INTO quarked_flyway VALUES (1001, 'test')"); | ||
} | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
extensions/flyway/deployment/src/test/java/db/migration/V1_0_2__Update.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package db.migration; | ||
|
||
import java.sql.Statement; | ||
|
||
import org.flywaydb.core.api.MigrationVersion; | ||
import org.flywaydb.core.api.migration.Context; | ||
import org.flywaydb.core.api.migration.JavaMigration; | ||
|
||
/** | ||
* Migration class for some testcases. | ||
*/ | ||
public class V1_0_2__Update implements JavaMigration { | ||
@Override | ||
public MigrationVersion getVersion() { | ||
return MigrationVersion.fromVersion("1.0.2"); | ||
} | ||
|
||
@Override | ||
public String getDescription() { | ||
return getClass().getSimpleName(); | ||
} | ||
|
||
@Override | ||
public Integer getChecksum() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public boolean canExecuteInTransaction() { | ||
return true; | ||
} | ||
|
||
@Override | ||
public void migrate(Context context) throws Exception { | ||
try (Statement statement = context.getConnection().createStatement()) { | ||
statement.executeUpdate("INSERT INTO quarked_flyway VALUES (1002, 'test')"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters