class Avram::Migrator::DropForeignKeyStatement

Overview

Generates an ALTER TABLE statement for dropping a foreign key constraint on a table.

Usage

DropForeignKeyStatement.new(from: :comments, references: :users, column: :author_id).build
# => "ALTER TABLE comments DROP CONSTRAINT comments_author_id_fk;"

Defined in:

avram/migrator/drop_foreign_key_statement.cr

Constructors

Instance Method Summary

Instance methods inherited from class Object

blank_for_validates_required? : Bool blank_for_validates_required?

Constructor Detail

def self.new(from : TableName, references : TableName, column : Symbol | Nil = nil) #

[View source]

Instance Method Detail

def build #

[View source]