abstract class Jennifer::Adapter::SchemaProcessor

Direct Known Subclasses

Defined in:

jennifer/adapter/schema_processor.cr

Constant Summary

ON_EVENT_ACTION_TRANSLATIONS = {FkEventActions::NoAction => "NO ACTION", FkEventActions::Restrict => "RESTRICT", FkEventActions::Cascade => "CASCADE", FkEventActions::SetNull => "SET NULL"}

Constructors

Instance Method Summary

Constructor Detail

def self.new(adapter) #

[View source]

Instance Method Detail

def adapter : Adapter::Base #

[View source]
def add_column(table, name, opts : Hash) #

[View source]
def add_foreign_key(from_table, to_table, column, primary_key, name, on_update, on_delete) #

[View source]
def add_index(table, name, fields : Array, type : Symbol? = nil, order : Hash? = nil, length : Hash? = nil) #

[View source]
def change_column(table, old_name, new_name, opts : Hash) #

[View source]
def create_table(builder : Migration::TableBuilder::CreateTable) #

[View source]
def create_view(name, query, silent = true) #

[View source]
def drop_column(table, name) #

[View source]
def drop_foreign_key(from_table, _to_table, name) #

[View source]
def drop_index(table, name) #

[View source]
def drop_table(builder : Migration::TableBuilder::DropTable) #

[View source]
def drop_view(name, silent = true) #

[View source]
abstract def rename_table(old_name : String | Symbol, new_name : String | Symbol) #

[View source]