Package migratedb.v1.core.api
Enum MigrationType
- java.lang.Object
-
- java.lang.Enum<MigrationType>
-
- migratedb.v1.core.api.MigrationType
-
- All Implemented Interfaces:
Serializable,Comparable<MigrationType>
public enum MigrationType extends Enum<MigrationType>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BASELINEBaseline marker inserted by the baseline command.DELETEDA migration that has been deleted by the repair command.JDBCJDBC Java-based incremental migrations.JDBC_BASELINEJDBC Java-based baseline migrations.SCHEMASchema creation marker.SQLSQL incremental migrations.SQL_BASELINESQL baseline migrations.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MigrationTypefromString(String migrationType)booleanisBaselineMigration()booleanisExclusiveToAppliedMigrations()static MigrationTypevalueOf(String name)Returns the enum constant of this type with the specified name.static MigrationType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SCHEMA
public static final MigrationType SCHEMA
Schema creation marker.
-
BASELINE
public static final MigrationType BASELINE
Baseline marker inserted by the baseline command. Its presence means that the current database state was accepted as the corresponding version without actually making any changes.
-
DELETED
public static final MigrationType DELETED
A migration that has been deleted by the repair command.
-
SQL
public static final MigrationType SQL
SQL incremental migrations.
-
SQL_BASELINE
public static final MigrationType SQL_BASELINE
SQL baseline migrations.
-
JDBC
public static final MigrationType JDBC
JDBC Java-based incremental migrations.
-
JDBC_BASELINE
public static final MigrationType JDBC_BASELINE
JDBC Java-based baseline migrations.
-
-
Method Detail
-
values
public static MigrationType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (MigrationType c : MigrationType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MigrationType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
fromString
public static MigrationType fromString(String migrationType)
-
isExclusiveToAppliedMigrations
public boolean isExclusiveToAppliedMigrations()
- Returns:
- Whether this migration type is only ever present in the schema history table, but never discovered by migration resolvers.
-
isBaselineMigration
public boolean isBaselineMigration()
- Returns:
- Whether this is a baseline migration, which represents all migrations with version
≤current baseline migration version. Note that the special baseline markerBASELINEis not a real migration, and therefore not a baseline migration.
-
-