class Marten::DB::Management::TableState

Overview

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

Defined in:

marten/db/management/table_state.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.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) #

[View source]

Class Method Detail

def self.from_model(model : Model.class) #

Initializes a table state from a specific model class.


[View source]
def self.gen_id(app_label : String, table_name : String) #

[View source]

Instance Method Detail

def add_column(column : Column::Base) : Nil #

[View source]
def add_index(index : Management::Index) : Nil #

[View source]
def add_unique_constraint(unique_constraint : Management::Constraint::Unique) : Nil #

[View source]
def app_label : String #

[View source]
def change_column(column : Column::Base) : Nil #

[View source]
def clone #

[View source]

[View source]
def get_column(name : String) : Column::Base #

[View source]
def get_index(name : String) : Management::Index #

[View source]
def get_unique_constraint(name : String) : Management::Constraint::Unique #

[View source]
def id : String #

[View source]

[View source]
def name : String #

[View source]
def name=(name : String) #

[View source]
def remove_column(column : Column::Base) #

[View source]
def remove_column(column_name : String) #

[View source]
def remove_index(index : Management::Index) : Nil #

[View source]
def remove_unique_constraint(unique_constraint : Management::Constraint::Unique) : Nil #

[View source]
def rename_column(old_name : String, new_name : String) #

[View source]

[View source]