X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/832b96b75ac05177e6baad7b414066ccfd7cfa51..b0bc04abf1cc17228b114cc60021e42f8dcdd51e:/config/initializers/postgresql_adapter.rb diff --git a/config/initializers/postgresql_adapter.rb b/config/initializers/postgresql_adapter.rb index 75971e4bf..825feba8b 100644 --- a/config/initializers/postgresql_adapter.rb +++ b/config/initializers/postgresql_adapter.rb @@ -59,6 +59,19 @@ if defined?(ActiveRecord::ConnectionAdapters::PostgreSQLAdapter) nil end end + + class PostgreSQLColumn + def simplified_type_with_enum(field_type) + case field_type + when /_enum$/ + :string + else + simplified_type_without_enum(field_type) + end + end + + alias_method_chain :simplified_type, :enum + end end end end