class

Avram::Migrator::DropForeignKeyStatement

Inherits Reference < Object

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;"

Constructors

new(from : TableName, references : TableName, column : Symbol | Nil = nil)
Source

Instance methods

build
Source