Idris2Doc : Oracle.Migration.Runner

Oracle.Migration.Runner

(source)

Definitions

ensureMigrationTable : Connection->IO (EitherOracleError ())
  Ensure that the migration history table exists.

The migration table is created automatically the first time any migration
operation is performed.

Visibility: export
listAppliedMigrations : Connection->IO (EitherOracleError (ListMigrationInfo))
  Retrieve all migrations that have already been applied.

Results are ordered by migration version.

Visibility: export
pendingMigrations : Connection->ListMigration->IO (EitherOracleError (ListMigration))
  Return migrations that have been defined by the application but have not yet been applied.

Visibility: export
migrationStatus : Connection->ListMigration->IO (EitherOracleError (ListMigrationStatus))
  Return the current migration status.

`MigrationPending` indicates a migration exists in the supplied application migration set but has not been applied.

`MigrationApplied` indicates both the migration definition and its persisted migration record exist.

`MigrationMissing` indicates a migration was previously applied but its definition is no longer present in the supplied migration set.

Visibility: export
runMigrations : Connection->ListMigration->IO (EitherOracleError ())
  Execute all pending migrations in ascending version order.

Each migration is applied by invoking its `up` action.

The migration is recorded in the migration history only after `up` succeeds.

The operation commits after each successfully applied migration.

This ensures that the migration history cannot claim that a migration succeeded when its database changes were rolled back.

Visibility: export
rollbackMigration : Connection->ListMigration->IO (EitherOracleError ())
  Roll back the most recently applied migration.

The supplied migration list is used to find the executable rollback action corresponding to the most recently applied migration.

Fails if:
* No migrations have been applied.
* The latest applied migration has no corresponding definition in the supplied migration list.

The migration history record is removed only after the rollback action succeeds.

Visibility: export