activerecord-sqlserver-adapter 5.1.0 → 5.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -1
- data/VERSION +1 -1
- data/lib/active_record/connection_adapters/sqlserver/core_ext/active_record.rb +3 -1
- data/lib/active_record/connection_adapters/sqlserver/core_ext/attribute_methods.rb +3 -1
- data/lib/active_record/connection_adapters/sqlserver/core_ext/explain.rb +4 -2
- data/lib/active_record/connection_adapters/sqlserver/core_ext/explain_subscriber.rb +5 -3
- data/lib/active_record/connection_adapters/sqlserver/schema_statements.rb +1 -1
- data/test/bin/setup.sh +1 -1
- data/test/cases/specific_schema_test_sqlserver.rb +0 -6
- data/test/schema/sqlserver_specific_schema.rb +0 -4
- metadata +2 -4
- data/test/models/sqlserver/dot_table_name.rb +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 378063f22d136e43bd1ed0f9bc52eb8958ccfb30
|
4
|
+
data.tar.gz: 97a3056adb1e8502d4e0c59ab6ce8a7367532651
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0fa22bb008d291d299b5d3cd9b9df7d94880076f0ca6de524036551e7a7a3d145a6472d53e6709b30d67a01bc44e7c7095583dcee107f6340f05e593cdabc7a
|
7
|
+
data.tar.gz: e1ed20a3214446b06a99aecab587f7163cffcdb0d6036669598ece9f0c162e6e6cca213202248ecb7239ac563cf218abf1b415bebc767278aa636e5bf84d2f94
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
5.1.
|
1
|
+
5.1.1
|
@@ -24,4 +24,6 @@ module ActiveRecord
|
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
|
-
|
27
|
+
ActiveSupport.on_load(:active_record) do
|
28
|
+
include ActiveRecord::ConnectionAdapters::SQLServer::CoreExt::ActiveRecord
|
29
|
+
end
|
@@ -22,4 +22,6 @@ module ActiveRecord
|
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
|
-
|
25
|
+
ActiveSupport.on_load(:active_record) do
|
26
|
+
include ActiveRecord::ConnectionAdapters::SQLServer::CoreExt::AttributeMethods
|
27
|
+
end
|
@@ -43,5 +43,7 @@ module ActiveRecord
|
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
46
|
-
|
47
|
-
|
46
|
+
ActiveSupport.on_load(:active_record) do
|
47
|
+
extend ActiveRecord::ConnectionAdapters::SQLServer::CoreExt::Explain
|
48
|
+
ActiveRecord::Relation.include(ActiveRecord::ConnectionAdapters::SQLServer::CoreExt::Explain)
|
49
|
+
end
|
@@ -1,4 +1,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
ActiveSupport.on_load(:active_record) do
|
2
|
+
silence_warnings do
|
3
|
+
# Already defined in Rails
|
4
|
+
ActiveRecord::ExplainSubscriber::EXPLAINED_SQLS = /(select|update|delete|insert)\b/i
|
5
|
+
end
|
4
6
|
end
|
@@ -25,7 +25,7 @@ module ActiveRecord
|
|
25
25
|
do_execute "DELETE FROM #{quote_table_name(fktable)} WHERE #{quote_column_name(fkcolmn)} IN ( SELECT #{quote_column_name(pkcolmn)} FROM #{quote_table_name(pktable)} )"
|
26
26
|
end
|
27
27
|
end
|
28
|
-
if options[:if_exists] && @version_year
|
28
|
+
if options[:if_exists] && @version_year < 2016
|
29
29
|
execute "IF EXISTS(SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = #{quote(table_name)}) DROP TABLE #{quote_table_name(table_name)}"
|
30
30
|
else
|
31
31
|
super
|
data/test/bin/setup.sh
CHANGED
@@ -9,12 +9,6 @@ class SpecificSchemaTestSQLServer < ActiveRecord::TestCase
|
|
9
9
|
SSTestDollarTableName.limit(20).offset(1)
|
10
10
|
end
|
11
11
|
|
12
|
-
it 'handle dot table names' do
|
13
|
-
SSTestDotTableName.create! name: 'test'
|
14
|
-
SSTestDotTableName.limit(20).offset(1)
|
15
|
-
SSTestDotTableName.where(name: 'test').first.must_be :present?
|
16
|
-
end
|
17
|
-
|
18
12
|
it 'models can use tinyint pk tables' do
|
19
13
|
obj = SSTestTinyintPk.create! name: '1'
|
20
14
|
['Fixnum', 'Integer'].must_include obj.id.class.name
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-sqlserver-adapter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.1.
|
4
|
+
version: 5.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ken Collins
|
@@ -14,7 +14,7 @@ authors:
|
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
|
-
date: 2017-
|
17
|
+
date: 2017-06-21 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: activerecord
|
@@ -167,7 +167,6 @@ files:
|
|
167
167
|
- test/models/sqlserver/datatype.rb
|
168
168
|
- test/models/sqlserver/datatype_migration.rb
|
169
169
|
- test/models/sqlserver/dollar_table_name.rb
|
170
|
-
- test/models/sqlserver/dot_table_name.rb
|
171
170
|
- test/models/sqlserver/edge_schema.rb
|
172
171
|
- test/models/sqlserver/fk_has_fk.rb
|
173
172
|
- test/models/sqlserver/fk_has_pk.rb
|
@@ -259,7 +258,6 @@ test_files:
|
|
259
258
|
- test/models/sqlserver/datatype.rb
|
260
259
|
- test/models/sqlserver/datatype_migration.rb
|
261
260
|
- test/models/sqlserver/dollar_table_name.rb
|
262
|
-
- test/models/sqlserver/dot_table_name.rb
|
263
261
|
- test/models/sqlserver/edge_schema.rb
|
264
262
|
- test/models/sqlserver/fk_has_fk.rb
|
265
263
|
- test/models/sqlserver/fk_has_pk.rb
|