Class MigrationInfoHelper
- java.lang.Object
-
- migratedb.v1.core.internal.resolver.MigrationInfoHelper
-
public class MigrationInfoHelper extends Object
Parsing support for migrations that use the standard MigrateDB version + description embedding in their name. These migrations have names like 1_2__Description .
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMigrationInfoHelper.VersionAndDescription
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MigrationInfoHelper.VersionAndDescriptionextractVersionAndDescription(String migrationName, String prefix, String separator, boolean repeatable)Extracts the schema version and the description from a migration name formatted as 1_2__Description.
-
-
-
Method Detail
-
extractVersionAndDescription
public static MigrationInfoHelper.VersionAndDescription extractVersionAndDescription(String migrationName, String prefix, String separator, boolean repeatable)
Extracts the schema version and the description from a migration name formatted as 1_2__Description.- Parameters:
migrationName- The migration name to parse. Should not contain any folders or packages.prefix- The migration prefix.separator- The migration separator.repeatable- Whether this is a repeatable migration.- Returns:
- The extracted schema version.
- Throws:
MigrateDbException- if the migration name does not follow the standard conventions.
-
-