Skip to content

class Athena::ORM::Migrations::Metadata::MigrationPlan
inherits Reference #

A migration planned to be executed in a given direction.

Constructors#

.new(version : AORM::Migrations::Version, migration_class : AORM::Migrations::AbstractMigration.class, direction : AORM::Migrations::Version::Direction)#

View source

Methods#

#direction : AORM::Migrations::Version::Direction#

Returns whether the migration is to be applied or reverted.

View source

#mark_as_executed(result : AORM::Migrations::Version::ExecutionResult) : Nil#

Sets the result of executing the migration.

Raises AORM::Migrations::Exception::PlanAlreadyExecuted if it was already set.

View source

#migration_class : AORM::Migrations::AbstractMigration.class#

Returns the type of the migration.

View source

#result : AORM::Migrations::Version::ExecutionResult | ::Nil#

Returns the result of executing the migration, or nil if it hasn't been executed yet.

View source

#version : AORM::Migrations::Version#

Returns the version of the migration.

View source