Skip to content

Commit

Permalink
Do not use bool alias (localytics#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
bfredenburg authored Jan 9, 2023
1 parent 1c59af4 commit 83586f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/odbc_adapter/adapters/postgresql_odbc_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module Adapters
# Overrides specific to PostgreSQL. Mostly taken from
# ActiveRecord::ConnectionAdapters::PostgreSQLAdapter
class PostgreSQLODBCAdapter < ActiveRecord::ConnectionAdapters::ODBCAdapter
BOOLEAN_TYPE = 'bool'.freeze
BOOLEAN_TYPE = 'boolean'.freeze
PRIMARY_KEY = 'SERIAL PRIMARY KEY'.freeze
VARIANT_TYPE = 'VARIANT'.freeze
DATE_TYPE = 'DATE'.freeze
Expand All @@ -13,7 +13,7 @@ class PostgreSQLODBCAdapter < ActiveRecord::ConnectionAdapters::ODBCAdapter

# Override to handle booleans appropriately
def native_database_types
@native_database_types ||= super.merge(boolean: { name: 'bool' })
@native_database_types ||= super.merge(boolean: { name: 'boolean' })
end

def arel_visitor
Expand Down

0 comments on commit 83586f4

Please sign in to comment.