Avoid "unknown OID" warnings from Postgres driver
This commit is contained in:
parent
57219d516a
commit
7d993febee
1 changed files with 14 additions and 0 deletions
|
@ -58,6 +58,20 @@ if defined?(ActiveRecord::ConnectionAdapters::PostgreSQLAdapter)
|
||||||
rescue
|
rescue
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def initialize_type_map_with_enums
|
||||||
|
OID.alias_type "format_enum", "text"
|
||||||
|
OID.alias_type "gpx_visibility_enum", "text"
|
||||||
|
OID.alias_type "note_status_enum", "text"
|
||||||
|
OID.alias_type "note_event_enum", "text"
|
||||||
|
OID.alias_type "nwr_enum", "text"
|
||||||
|
OID.alias_type "user_role_enum", "text"
|
||||||
|
OID.alias_type "user_status_enum", "text"
|
||||||
|
|
||||||
|
initialize_type_map_without_enums
|
||||||
|
end
|
||||||
|
|
||||||
|
alias_method_chain :initialize_type_map, :enums
|
||||||
end
|
end
|
||||||
|
|
||||||
class PostgreSQLColumn
|
class PostgreSQLColumn
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue