1 if defined?(ActiveRecord::ConnectionAdapters::PostgreSQLAdapter)
3 module ConnectionAdapters
4 class PostgreSQLAdapter
5 def initialize_type_map_with_enums(type_map)
6 OID.alias_type "format_enum", "text"
7 OID.alias_type "gpx_visibility_enum", "text"
8 OID.alias_type "note_status_enum", "text"
9 OID.alias_type "note_event_enum", "text"
10 OID.alias_type "nwr_enum", "text"
11 OID.alias_type "user_role_enum", "text"
12 OID.alias_type "user_status_enum", "text"
14 initialize_type_map_without_enums(type_map)
17 alias_method_chain :initialize_type_map, :enums
20 class PostgreSQLColumn
21 def simplified_type_with_enum(field_type)
26 simplified_type_without_enum(field_type)
30 alias_method_chain :simplified_type, :enum