Skip to content

Commit d79cfb1

Browse files
committed
Remove backward compatible code
1 parent 3399f41 commit d79cfb1

File tree

2 files changed

+5
-17
lines changed

2 files changed

+5
-17
lines changed

lib/active_record/connection_adapters/sqlserver/schema_creation.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@
33
module ActiveRecord
44
module ConnectionAdapters
55
module SQLServer
6-
BASE_SCHEMA_CREATION_CLASS = Rails::VERSION::MAJOR >= 6 && Rails::VERSION::MINOR >= 1 ?
7-
SchemaCreation :
8-
AbstractAdapter::SchemaCreation
9-
10-
class SchemaCreation < BASE_SCHEMA_CREATION_CLASS
6+
class SchemaCreation < SchemaCreation
117
private
128

139
def visit_TableDefinition(o)

lib/active_record/connection_adapters/sqlserver/transaction.rb

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,10 @@ def current_isolation_level
3131
module SQLServerRealTransaction
3232
attr_reader :starting_isolation_level
3333

34-
if Rails::VERSION::MAJOR >= 6 && Rails::VERSION::MINOR >= 1
35-
def initialize(connection, **args)
36-
@connection = connection
37-
@starting_isolation_level = current_isolation_level if args[:isolation]
38-
super
39-
end
40-
else
41-
def initialize(connection, options, **args)
42-
@connection = connection
43-
@starting_isolation_level = current_isolation_level if options[:isolation]
44-
super
45-
end
34+
def initialize(connection, isolation: nil, joinable: true, run_commit_callbacks: false)
35+
@connection = connection
36+
@starting_isolation_level = current_isolation_level if isolation
37+
super
4638
end
4739

4840
def commit

0 commit comments

Comments
 (0)