File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
lib/active_record/connection_adapters Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -243,7 +243,7 @@ def active?
243243 end
244244
245245 def reconnect
246- @raw_connection . close rescue nil
246+ @raw_connection & .close rescue nil
247247 @raw_connection = nil
248248 @spid = nil
249249 @collation = nil
@@ -254,7 +254,7 @@ def reconnect
254254 def disconnect!
255255 super
256256
257- @raw_connection . close rescue nil
257+ @raw_connection & .close rescue nil
258258 @raw_connection = nil
259259 @spid = nil
260260 @collation = nil
@@ -338,6 +338,12 @@ def get_database_version # :nodoc:
338338 version_year
339339 end
340340
341+ def check_version # :nodoc:
342+ if schema_cache . database_version < 2012
343+ raise "Your version of SQL Server (#{ database_version } ) is too old. SQL Server Active Record supports 2012 or higher."
344+ end
345+ end
346+
341347 class << self
342348 protected
343349
You can’t perform that action at this time.
0 commit comments