Module: ActiveRecord::Collation::SchemaDumper

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

Overview

Overrides the PostgresAdapter schema dumper to include collations.

Instance Method Summary collapse

Instance Method Details

#collations(stream) ⇒ Object



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

def collations(stream)
  collations = @connection.collations
  return unless collations.any?

  collations.each do |row|
    stream.puts(
      "  create_collation(#{row['collname'].inspect}, #{row['colllocale'].inspect})"
    )
  end
  stream.puts
end

#tables(stream) ⇒ Object



21
22
23
24
# File 'lib/active_record/collation/schema_dumper.rb', line 21

def tables(stream)
  collations(stream)
  super
end