Module: Polymorpheus::SchemaDumper

Extended by:
ActiveSupport::Concern
Defined in:
lib/polymorpheus/schema_dumper.rb

Instance Method Summary collapse

Instance Method Details

#tables_with_triggers(stream) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/polymorpheus/schema_dumper.rb', line 10

def tables_with_triggers(stream)
  tables_without_triggers(stream)

  if @connection.respond_to?(:triggers)
    @connection.triggers.collect(&:schema_statement).uniq.each do |statement|
      stream.puts statement
    end
  end

  stream.puts
end