class Marten::DB::Management::Migrations::Runner
- Marten::DB::Management::Migrations::Runner
- Reference
- Object
Defined in:
marten/db/management/migrations/runner.crmarten/db/management/migrations/runner/pre_initial_node.cr
marten/db/management/migrations/runner/progress.cr
marten/db/management/migrations/runner/progress_type.cr
Constant Summary
-
PRE_INITIAL_MIGRATION_ID =
"zero"
Constructors
Instance Method Summary
-
#execute(app_config : Apps::Config | Nil = nil, migration_name : String | Nil = nil, fake = false)
Executes the migrations up until the specified app config / migration name (if specified).
-
#execute(app_config : Apps::Config | Nil = nil, migration_name : String | Nil = nil, fake = false, &)
Executes the migrations up until the specified app config / migration name (if specified).
-
#execution_needed?(app_config : Apps::Config | Nil = nil, migration_name : String | Nil = nil) : Bool
Returns
true
if the execution of the runner is needed for the specified app config and migration name. - #mark_elligible_replacements_as_applied(&)
-
#plan(app_config : Apps::Config | Nil = nil, migration_name : String | Nil = nil) : Array(Tuple(Migration, Bool))
Returns the migration plan for the specified app config and migration name.
Constructor Detail
Instance Method Detail
Executes the migrations up until the specified app config / migration name (if specified).
If no app config / migration name is specified, the method executes all the non-applied migrations.
Executes the migrations up until the specified app config / migration name (if specified).
If no app config / migration name is specified, the method executes all the non-applied migrations.
It should be noted that this method yields a Marten::DB::Management::Migrations::Runner::Progress
object
at each execution of a migration (before and after).
Returns true
if the execution of the runner is needed for the specified app config and migration name.
Returns the migration plan for the specified app config and migration name.
This method returns an array of tuples containing (i) a migration to apply and (ii) a boolean indicating if the migration should be applied in a backward way.