class

Marten::DB::Management::TableState

Inherits Reference / Object

Represents the state of a specific table at a specific step in a migration plan.

Constructors

new(app_label : String, name : String, columns : Array(Column::Base), unique_constraints : Array(Management::Constraint::Unique) = [] of Management::Constraint::Unique, indexes : Array(Management::Index) = [] of Management::Index)
Source

Class methods

from_model(model : Model.class)

Initializes a table state from a specific model class.

Source
gen_id(app_label : String, table_name : String)
Source

Instance methods

add_column(column : Column::Base) : Nil
Source
add_index(index : Management::Index) : Nil
Source
add_unique_constraint(unique_constraint : Management::Constraint::Unique) : Nil
Source
app_label
Source
change_column(column : Column::Base) : Nil
Source
clone
Source
columns
Source
get_column(name : String) : Column::Base
Source
get_index(name : String) : Management::Index
Source
get_unique_constraint(name : String) : Management::Constraint::Unique
Source
indexes
Source
name
Source
name=(name : String)
Source
remove_column(column : Column::Base)
Source
remove_column(column_name : String)
Source
remove_index(index : Management::Index) : Nil
Source
remove_unique_constraint(unique_constraint : Management::Constraint::Unique) : Nil
Source
rename_column(old_name : String, new_name : String)
Source
unique_constraints
Source