class Marten::DB::Migration::Operation::ChangeColumn
Defined in:
marten/db/migration/operation/change_column.crConstructors
Instance Method Summary
- #column : Marten::DB::Management::Column::Base
-
#describe : String
Returns a human-friendly description of what the operation is doing.
-
#mutate_db_backward(app_label : String, schema_editor : Management::SchemaEditor::Base, from_state : Management::ProjectState, to_state : Management::ProjectState) : Nil
Applies the operation in a backward way at the database level.
-
#mutate_db_forward(app_label : String, schema_editor : Management::SchemaEditor::Base, from_state : Management::ProjectState, to_state : Management::ProjectState) : Nil
Applies the operation at the database level.
-
#mutate_state_forward(app_label : String, state : Management::ProjectState) : Nil
Applies the operation at the project state level.
-
#optimize(operation : Base) : Optimization::Result
Combines the specified operation with the current one and return an array of corresponding operations.
-
#references_column?(other_table_name : String, other_column_name : String) : Bool
Returns
true
if the operation references the specified table column. -
#references_table?(other_table_name : String) : Bool
Returns
true
if the operation references the specified table. -
#serialize : String
Renders a serialized version of the mutation.
- #table_name : String
Instance methods inherited from class Marten::DB::Migration::Operation::Base
describe : String
describe,
faked=(faked : Bool)
faked=,
faked? : Bool
faked?,
mutate_db_backward(app_label : String, schema_editor : Management::SchemaEditor::Base, from_state : Management::ProjectState, to_state : Management::ProjectState) : Nil
mutate_db_backward,
mutate_db_forward(app_label : String, schema_editor : Management::SchemaEditor::Base, from_state : Management::ProjectState, to_state : Management::ProjectState) : Nil
mutate_db_forward,
mutate_state_forward(app_label : String, state : Management::ProjectState) : Nil
mutate_state_forward,
optimize(operation : Base) : Optimization::Result
optimize,
references_column?(other_table_name : String, other_column_name : String) : Bool
references_column?,
references_table?(other_table_name : String) : Bool
references_table?,
serialize : String
serialize
Instance methods inherited from module Marten::DB::CanFormatStringsOrSymbols
format_string_or_symbol(value : String)
format_string_or_symbol
Constructor Detail
Instance Method Detail
Returns a human-friendly description of what the operation is doing.
Applies the operation in a backward way at the database level.
For most operation, this will involve "unapplying" whatever was done as part of the #mutate_db_forward
method.
Applies the operation at the database level.
Applies the operation at the project state level.
Combines the specified operation with the current one and return an array of corresponding operations.
Returns true
if the operation references the specified table column.
Returns true
if the operation references the specified table.
Renders a serialized version of the mutation.
This method is used when generating migrations: the serialized operation is inserted in the #plan
method
of the generated migration.