Package org.flywaydb.core.api
Enum MigrationType
- java.lang.Object
-
- java.lang.Enum<MigrationType>
-
- org.flywaydb.core.api.MigrationType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<MigrationType>
public enum MigrationType extends java.lang.Enum<MigrationType>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BASELINE
Baseline migration.CUSTOM
Migrations using custom MigrationResolvers.DELETE
Deleted migrationJDBC
JDBC Java-based migrations.JDBC_BASELINE
JDBC Java-based baseline migrations.SCHEMA
Schema creation migration.SCRIPT
Script migrations.SCRIPT_BASELINE
Script baseline migrations.SQL
SQL migrations.SQL_BASELINE
SQL baseline migrations.UNDO_CUSTOM
Undo migrations using custom MigrationResolvers.UNDO_JDBC
Undo JDBC java-based migrations.UNDO_SCRIPT
Undo Script migrations.UNDO_SQL
Undo SQL migrations.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MigrationType
fromString(java.lang.String migrationType)
boolean
isBaselineMigration()
boolean
isSynthetic()
boolean
isUndo()
static MigrationType
valueOf(java.lang.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 migration.
-
BASELINE
public static final MigrationType BASELINE
Baseline migration.
-
DELETE
public static final MigrationType DELETE
Deleted migration
-
SQL
public static final MigrationType SQL
SQL migrations.
-
SQL_BASELINE
public static final MigrationType SQL_BASELINE
SQL baseline migrations.
-
UNDO_SQL
public static final MigrationType UNDO_SQL
Undo SQL migrations.
-
JDBC
public static final MigrationType JDBC
JDBC Java-based migrations.
-
JDBC_BASELINE
public static final MigrationType JDBC_BASELINE
JDBC Java-based baseline migrations.
-
UNDO_JDBC
public static final MigrationType UNDO_JDBC
Undo JDBC java-based migrations.
-
SCRIPT
public static final MigrationType SCRIPT
Script migrations.
-
SCRIPT_BASELINE
public static final MigrationType SCRIPT_BASELINE
Script baseline migrations.
-
UNDO_SCRIPT
public static final MigrationType UNDO_SCRIPT
Undo Script migrations.
-
CUSTOM
public static final MigrationType CUSTOM
Migrations using custom MigrationResolvers.
-
UNDO_CUSTOM
public static final MigrationType UNDO_CUSTOM
Undo migrations using custom MigrationResolvers.
-
-
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(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
fromString
public static MigrationType fromString(java.lang.String migrationType)
-
isSynthetic
public boolean isSynthetic()
- Returns:
- Whether this is a synthetic migration type, which is only ever present in the schema history table, but never discovered by migration resolvers.
-
isUndo
public boolean isUndo()
- Returns:
- Whether this is an undo migration, which has undone an earlier migration present in the schema history table.
-
isBaselineMigration
public boolean isBaselineMigration()
- Returns:
- Whether this is a baseline migration, which represents all migrations with version <= current baseline migration version.
-
-