class

Marten::DB::Management::Migrations::Reader

Inherits Reference / Object

Represents a migrations reader.

The migration reader will process all migrations defined by the available apps and all the migrations that were already applied (ie. recorded) for the existing database in order to build a corresponding directed acyclic graph of migrations.

Constructors

new(connection : Connection::Base | Nil = nil)
Source

Instance methods

applied_migrations
Source
apps_with_migrations

Returns an array of apps that have migrations defined.

Source
get_migration(app_config : Apps::Config, migration_name : String) : Migration.class

Returns a migration class for a specific app config and migration name.

Source
graph
Source
latest_migration(app_config : Apps::Config) : Migration.class | Nil

Returns the latest migration class (if any) for a given app config.

Source
replacements
Source