Class: DbDiff::Delta::AddTrigger
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
336
337
338
|
# File 'lib/dbdiff/delta.rb', line 336
def process(database)
table(database).triggers << element
end
|
#sql ⇒ Object
332
333
334
|
# File 'lib/dbdiff/delta.rb', line 332
def sql
return "CREATE TRIGGER `#{element.name}` #{element.timing} #{element.event} ON #{element.table_name} FOR EACH ROW #{element.definition}"
end
|