Fly4s

sealed
trait Fly4s[F[_]]
Companion
object
class Object
trait Matchable
class Any

Value members

Abstract methods

Baselines an existing database, excluding all migrations up to and including baselineVersion.

Baselines an existing database, excluding all migrations up to and including baselineVersion.

baseline
Returns

An object summarising the actions taken

Drops all objects (tables, views, procedures, triggers, ...) in the configured schemas. The schemas are cleaned in the order specified by the schemas property. clean

Drops all objects (tables, views, procedures, triggers, ...) in the configured schemas. The schemas are cleaned in the order specified by the schemas property. clean

Returns

An object summarising the actions taken

Get che Fly4s configuration used to build this instance.

Get che Fly4s configuration used to build this instance.

Retrieves the complete information about all the migrations including applied, pending and current migrations with details and status. info

Retrieves the complete information about all the migrations including applied, pending and current migrations with details and status. info

Returns

All migrations sorted by version, oldest first.

Starts the database migration. All pending migrations will be applied in order. Calling migrate on an up-to-date database has no effect. migrate

Starts the database migration. All pending migrations will be applied in order. Calling migrate on an up-to-date database has no effect. migrate

Returns

An object summarising the successfully applied migrations.

def reconfigure(newConfig: Fly4sConfig): F[Fly4s[F]]

Re-instantiate a Fly4s instance with the new configuration

Re-instantiate a Fly4s instance with the new configuration

Value Params
newConfig

New configuration instance

Returns

Fly4s instance with the new configuration

Repairs the Flyway schema history table. This will perform the following actions:

Repairs the Flyway schema history table. This will perform the following actions:

  • Remove any failed migrations on databases without DDL transactions (User objects left behind must still be cleaned up manually)
  • Realign the checksums, descriptions and types of the applied migrations with the ones of the available migrations repair
Returns

An object summarising the actions taken

Retrieves the url, user and password used to construct the dataSource. May be None if the dataSource was passed in directly.

Retrieves the url, user and password used to construct the dataSource. May be None if the dataSource was passed in directly.

Returns

The url, user and password used to construct the dataSource. May be None if the dataSource was passed in directly.

Undoes the most recently applied versioned migration. If target is specified, Flyway will attempt to undo versioned migrations in the order they were applied until it hits one with a version below the target. If there is no versioned migration to undo, calling undo has no effect.

Undoes the most recently applied versioned migration. If target is specified, Flyway will attempt to undo versioned migrations in the order they were applied until it hits one with a version below the target. If there is no versioned migration to undo, calling undo has no effect.

Flyway Teams only undo

Returns

An object summarising the successfully undone migrations.

Validate applied migrations against resolved ones (on the filesystem or classpath) to detect accidental changes that may prevent the schema(s) from being recreated exactly.

Validate applied migrations against resolved ones (on the filesystem or classpath) to detect accidental changes that may prevent the schema(s) from being recreated exactly.

Validation fails if

  • differences in migration names, types or checksums are found

  • versions have been applied that aren't resolved locally anymore

  • versions have been resolved that haven't been applied yet

validate
Returns

An object summarising the validation results

Validate and then runs migrations.

Validate and then runs migrations.

1. Validation To apply the validation we reconfigure the Fly4s with ignorePendingMigrations set as true Check Fly4s.validate for further details

2. Migration If validation steps fails migration wont be applied. Check Fly4s.migrate for further details

Returns

An ValidatedNel summarising the operation results.

Concrete methods

def reconfigure(updateConfig: () => Fly4sConfig): F[Fly4s[F]]

Re-instantiate a Fly4s instance with the updated configuration

Re-instantiate a Fly4s instance with the updated configuration

Value Params
updateConfig

Function to update configuration

Returns

Fly4s instance with the updated configuration