Sha256: a5b722a0f7a2ea59fc6d7181fe9c2cbb8a24a6fc50a959fdc8deb388f94ad5ec
Contents?: true
Size: 677 Bytes
Versions: 8
Compression:
Stored size: 677 Bytes
Contents
module ActiveRecord module PGEnum register :schema_dumper do require "active_record/schema_dumper" ActiveRecord::SchemaDumper.prepend SchemaDumper end module SchemaDumper private def extensions(stream) super enums(stream) end def enums(stream) return unless (enum_types = @connection.enum_types).any? stream.puts " # These are custom enum types that must be created before they can be used in the schema definition" enum_types.each do |name, definition| stream.puts %Q{ create_enum "#{name}", #{definition}} end stream.puts end end end end
Version data entries
8 entries across 8 versions & 1 rubygems