Class: DbDiff::Delta::DropForeignKey
Instance Attribute Summary
#element
Instance Method Summary
collapse
#initialize, #table, #to_a
Constructor Details
This class inherits a constructor from DbDiff::Delta
Instance Method Details
#process(database) ⇒ Object
205
206
207
|
# File 'lib/dbdiff/delta.rb', line 205
def process(database)
table(database).foreign_keys.delete(element)
end
|
#sql ⇒ Object
201
202
203
|
# File 'lib/dbdiff/delta.rb', line 201
def sql
"ALTER table #{element.table_name} DROP FOREIGN KEY `#{element.name}`;\n"
end
|