Class: Multitenant::Triggers::SQL::Drop
- Inherits:
-
Object
- Object
- Multitenant::Triggers::SQL::Drop
- Defined in:
- lib/generators/multitenant/triggers/sql/drop.rb
Class Method Summary collapse
Class Method Details
.run ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/generators/multitenant/triggers/sql/drop.rb', line 10 def self.run list = Multitenant::List.new list.sql = Multitenant::SQL::TRIGGERS list.to_a.each do |trigger| ActiveRecord::Base.connection.execute("DROP TRIGGER #{trigger};") p "==================== Dropped Trigger: #{trigger} ==================" end end |