class

Marten::DB::Migration

Inherits Marten::DB::Migration::DSL / Marten::Apps::Association / Reference / Object

Constructors

Class methods

atomic(atomic : Bool)

Allows to specify whether the whole migration should run inside a single transaction or not.

By default, for databases that support DDL transactions, each migration will run inside a single transaction. This can be disabled on a per-migration basis, which can be useful is the migration is intended to affect large tables or when performing data migrations.

Source
atomic?
Source
depends_on(app_name : String | Symbol, migration_name : String | Symbol)

Allows to specify the dependencies of the current migration.

This class method takes an app_name and a migration_name as argument and adds the corresponding migration to the list of migration dependencies of the current migration.

Source
depends_on
Source
migration_name
Source
replacement_ids
Source
replaces(app_name : String | Symbol, migration_name : String | Symbol)

Allows to specify the migrations the current migration is replacing.

This class method takes an app_name and a migration_name as argument and adds the corresponding migration to the list of migration replaced by the current migration.

Source
replaces
Source

Instance methods

apply
Source
apply_backward(pre_forward_project_state : Management::ProjectState, project_state : Management::ProjectState, schema_editor : Management::SchemaEditor::Base)
Source
apply_forward(project_state : Management::ProjectState, schema_editor : Management::SchemaEditor::Base)
Source
atomic?
Source
mutate_state_forward(project_state : Management::ProjectState, preserve = true)
Source
plan
Source
unapply
Source

Nested types