Skip to content

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

The available migrations, ordered by version.

Constructors#

Methods#

#first(offset : Int32 = 0) : AORM::Migrations::Metadata::AvailableMigration#

Returns the migration at offset from the start of the list.

Raises AORM::Migrations::Exception::NoMigrationsFoundWithCriteria if there isn't one.

View source

#has_migration?(version : AORM::Migrations::Version) : Bool#

Returns true if the list contains a migration with the provided version.

View source

#items : Array(AORM::Migrations::Metadata::AvailableMigration)#

Returns the migrations in the list.

View source

#last(offset : Int32 = 0) : AORM::Migrations::Metadata::AvailableMigration#

Returns the last migration of the list, or the one offset before it when offset is negative.

Raises AORM::Migrations::Exception::NoMigrationsFoundWithCriteria if there isn't one.

View source

#migration(version : AORM::Migrations::Version) : AORM::Migrations::Metadata::AvailableMigration#

Returns the migration with the provided version.

Raises AORM::Migrations::Exception::MigrationNotAvailable if the list doesn't contain one.

View source

#new_subset(executed_migrations : AORM::Migrations::Metadata::ExecutedMigrationsList) : self#

Returns the migrations of this list that aren't in executed_migrations.

View source

#size : Int32#

Returns the number of migrations in the list.

View source