Class SherlockMigrator

java.lang.Object
com.coditory.sherlock.rxjava.migrator.SherlockMigrator

public final class SherlockMigrator extends Object
Migration mechanism based on Sherlock distributed locks.

It can be used to perform one way database migrations.

Migration rules:

  • migrations must not run in parallel
  • migration change sets are applied in order
  • migration change sets must be run only once per all migrations
  • migration process stops after first change set failure
  • Method Details

    • builder

      public static SherlockMigratorBuilder builder(@NotNull @NotNull Sherlock sherlock)
    • migrate

      @NotNull public @NotNull io.reactivex.rxjava3.core.Single<com.coditory.sherlock.migrator.MigrationResult> migrate()
      Runs the migration process.
      Returns:
      migration result