Skip to content

Commit cc6a5e7

Browse files
authored
Merge pull request #1056 from dr-itz/rails6-dev
Rails 6.0 fixes
2 parents 4f40dc2 + bb8610f commit cc6a5e7

File tree

5 files changed

+7
-3
lines changed

5 files changed

+7
-3
lines changed

lib/arjdbc/postgresql/adapter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ def quote_table_name(name)
512512
alias_method :quote_schema_name, :quote_column_name
513513

514514
# Need to clear the cache even though the AR adapter doesn't for some reason
515-
def remove_column(table_name, column_name, type = nil, options = {})
515+
def remove_column(table_name, column_name, type = nil, **options)
516516
super
517517
clear_cache!
518518
end

lib/arjdbc/postgresql/oid_types.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def load_additional_types(type_map, oid = nil) # :nodoc:
213213
if oid
214214
if oid.is_a? Numeric || oid.match(/^\d+$/)
215215
# numeric OID
216-
query += "WHERE t.oid::integer = %s" % oid
216+
query += "WHERE t.oid = %s" % oid
217217

218218
elsif m = oid.match(/"?(\w+)"?\."?(\w+)"?/)
219219
# namespace and type name

lib/arjdbc/sqlite3/adapter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ def add_column(table_name, column_name, type, options = {}) #:nodoc:
229229
end
230230
end
231231

232-
def remove_column(table_name, column_name, type = nil, options = {}) #:nodoc:
232+
def remove_column(table_name, column_name, type = nil, **options) #:nodoc:
233233
alter_table(table_name) do |definition|
234234
definition.remove_column column_name
235235
definition.foreign_keys.delete_if do |_, fk_options|
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
exclude :test_raises_SerializationFailure_when_a_serialization_failure_occurs, 'hangs sometimes'
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
if ActiveRecord::Base.connection.database_version < 90500
2+
exclude :test_pretty_print, 'fails with PG < 9.5'
3+
end

0 commit comments

Comments
 (0)