Class: DbDiff::Delta::DropKey
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
180
181
182
183
|
# File 'lib/dbdiff/delta.rb', line 180
def process(database)
table = table(database)
table.keys.delete(element)
end
|
#sql ⇒ Object
176
177
178
|
# File 'lib/dbdiff/delta.rb', line 176
def sql
"ALTER TABLE #{element.table_name} DROP KEY `#{element.name}`"
end
|