Package com.coditory.sherlock.migrator
Class SherlockMigratorBuilder
java.lang.Object
com.coditory.sherlock.migrator.SherlockMigratorBuilder
-
Method Summary
Modifier and TypeMethodDescription@NotNull SherlockMigratorBuilder
addAnnotatedChangeSets
(@NotNull Object object) @NotNull SherlockMigratorBuilder
addChangeSet
(@NotNull String changeSetId, @NotNull Runnable changeSet) Adds change set to migration process.@NotNull SherlockMigrator
build()
@NotNull com.coditory.sherlock.migrator.MigrationResult
migrate()
@NotNull SherlockMigratorBuilder
setMigrationId
(@NotNull String migrationId)
-
Method Details
-
setMigrationId
@NotNull public @NotNull SherlockMigratorBuilder setMigrationId(@NotNull @NotNull String migrationId) -
addChangeSet
@NotNull public @NotNull SherlockMigratorBuilder addChangeSet(@NotNull @NotNull String changeSetId, @NotNull @NotNull Runnable changeSet) Adds change set to migration process.- Parameters:
changeSetId
- unique change set id used. This is used as a lock id in migration process.changeSet
- change set action that should be run if change set was not already applied- Returns:
- the migrator
-
addAnnotatedChangeSets
@NotNull public @NotNull SherlockMigratorBuilder addAnnotatedChangeSets(@NotNull @NotNull Object object) -
build
-
migrate
@NotNull public @NotNull com.coditory.sherlock.migrator.MigrationResult migrate()
-