activerecord-jdbcsqlserver-adapter 50.1.0 → 51.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +3 -1
  3. data/.travis.yml +4 -5
  4. data/BACKERS.md +32 -0
  5. data/CHANGELOG.md +21 -87
  6. data/README.md +2 -3
  7. data/VERSION +1 -1
  8. data/activerecord-jdbcsqlserver-adapter.gemspec +3 -2
  9. data/appveyor.yml +1 -1
  10. data/lib/active_record/connection_adapters/sqlserver/core_ext/active_record.rb +3 -1
  11. data/lib/active_record/connection_adapters/sqlserver/core_ext/attribute_methods.rb +3 -1
  12. data/lib/active_record/connection_adapters/sqlserver/core_ext/calculations.rb +55 -0
  13. data/lib/active_record/connection_adapters/sqlserver/core_ext/explain.rb +4 -2
  14. data/lib/active_record/connection_adapters/sqlserver/core_ext/explain_subscriber.rb +5 -3
  15. data/lib/active_record/connection_adapters/sqlserver/database_statements.rb +41 -18
  16. data/lib/active_record/connection_adapters/sqlserver/jdbc_overrides.rb +2 -12
  17. data/lib/active_record/connection_adapters/sqlserver/schema_creation.rb +22 -0
  18. data/lib/active_record/connection_adapters/sqlserver/schema_dumper.rb +21 -0
  19. data/lib/active_record/connection_adapters/sqlserver/schema_statements.rb +72 -52
  20. data/lib/active_record/connection_adapters/sqlserver/table_definition.rb +15 -7
  21. data/lib/active_record/connection_adapters/sqlserver/type/big_integer.rb +0 -4
  22. data/lib/active_record/connection_adapters/sqlserver/type/data.rb +5 -0
  23. data/lib/active_record/connection_adapters/sqlserver/type/datetime.rb +3 -6
  24. data/lib/active_record/connection_adapters/sqlserver_adapter.rb +27 -10
  25. data/lib/active_record/tasks/sqlserver_database_tasks.rb +2 -2
  26. data/lib/activerecord-jdbcsqlserver-adapter.rb +1 -1
  27. data/lib/arel/visitors/sqlserver.rb +16 -3
  28. data/test/bin/setup.sh +19 -0
  29. data/test/cases/adapter_test_sqlserver.rb +17 -20
  30. data/test/cases/coerced_tests.rb +117 -11
  31. data/test/cases/column_test_sqlserver.rb +1 -1
  32. data/test/cases/helper_sqlserver.rb +6 -1
  33. data/test/cases/pessimistic_locking_test_sqlserver.rb +28 -11
  34. data/test/cases/schema_dumper_test_sqlserver.rb +10 -10
  35. data/test/cases/specific_schema_test_sqlserver.rb +0 -6
  36. data/test/cases/trigger_test_sqlserver.rb +31 -0
  37. data/test/config.yml +2 -2
  38. data/test/models/sqlserver/trigger.rb +7 -0
  39. data/test/models/sqlserver/trigger_history.rb +3 -0
  40. data/test/schema/sqlserver_specific_schema.rb +39 -5
  41. data/test/support/sql_counter_sqlserver.rb +3 -2
  42. metadata +23 -16
  43. data/RAILS5-TODO.md +0 -5
  44. data/lib/jdbc_mssql_driver_loader.rb +0 -22
  45. data/test/models/sqlserver/dot_table_name.rb +0 -3
@@ -38,17 +38,17 @@ class SchemaDumperTestSQLServer < ActiveRecord::TestCase
38
38
  # Character Strings
39
39
  assert_line :char_10, type: 'char', limit: 10, precision: nil, scale: nil, default: "1234567890", collation: nil
40
40
  assert_line :varchar_50, type: 'varchar', limit: 50, precision: nil, scale: nil, default: "test varchar_50", collation: nil
41
- assert_line :varchar_max, type: 'varchar_max', limit: 2147483647, precision: nil, scale: nil, default: "test varchar_max", collation: nil
42
- assert_line :text, type: 'text_basic', limit: 2147483647, precision: nil, scale: nil, default: "test text", collation: nil
41
+ assert_line :varchar_max, type: 'varchar_max', limit: nil, precision: nil, scale: nil, default: "test varchar_max", collation: nil
42
+ assert_line :text, type: 'text_basic', limit: nil, precision: nil, scale: nil, default: "test text", collation: nil
43
43
  # Unicode Character Strings
44
44
  assert_line :nchar_10, type: 'nchar', limit: 10, precision: nil, scale: nil, default: "12345678åå", collation: nil
45
45
  assert_line :nvarchar_50, type: 'string', limit: 50, precision: nil, scale: nil, default: "test nvarchar_50 åå", collation: nil
46
- assert_line :nvarchar_max, type: 'text', limit: 2147483647, precision: nil, scale: nil, default: "test nvarchar_max åå", collation: nil
47
- assert_line :ntext, type: 'ntext', limit: 2147483647, precision: nil, scale: nil, default: "test ntext åå", collation: nil
46
+ assert_line :nvarchar_max, type: 'text', limit: nil, precision: nil, scale: nil, default: "test nvarchar_max åå", collation: nil
47
+ assert_line :ntext, type: 'ntext', limit: nil, precision: nil, scale: nil, default: "test ntext åå", collation: nil
48
48
  # Binary Strings
49
49
  assert_line :binary_49, type: 'binary_basic', limit: 49, precision: nil, scale: nil, default: nil
50
50
  assert_line :varbinary_49, type: 'varbinary', limit: 49, precision: nil, scale: nil, default: nil
51
- assert_line :varbinary_max, type: 'binary', limit: 2147483647, precision: nil, scale: nil, default: nil
51
+ assert_line :varbinary_max, type: 'binary', limit: nil, precision: nil, scale: nil, default: nil
52
52
  # Other Data Types
53
53
  assert_line :uniqueidentifier, type: 'uuid', limit: nil, precision: nil, scale: nil, default: -> { "newid()" }
54
54
  assert_line :timestamp, type: 'ss_timestamp', limit: nil, precision: nil, scale: nil, default: nil
@@ -76,12 +76,12 @@ class SchemaDumperTestSQLServer < ActiveRecord::TestCase
76
76
  assert_line :decimal_col, type: 'decimal', limit: nil, precision: 18, scale: 0, default: nil
77
77
  assert_line :float_col, type: 'float', limit: nil, precision: nil, scale: nil, default: nil
78
78
  assert_line :string_col, type: 'string', limit: nil, precision: nil, scale: nil, default: nil
79
- assert_line :text_col, type: 'text', limit: 2147483647, precision: nil, scale: nil, default: nil
79
+ assert_line :text_col, type: 'text', limit: nil, precision: nil, scale: nil, default: nil
80
80
  assert_line :datetime_col, type: 'datetime', limit: nil, precision: nil, scale: nil, default: nil
81
81
  assert_line :timestamp_col, type: 'datetime', limit: nil, precision: nil, scale: nil, default: nil
82
82
  assert_line :time_col, type: 'time', limit: nil, precision: 7, scale: nil, default: nil
83
83
  assert_line :date_col, type: 'date', limit: nil, precision: nil, scale: nil, default: nil
84
- assert_line :binary_col, type: 'binary', limit: 2147483647, precision: nil, scale: nil, default: nil
84
+ assert_line :binary_col, type: 'binary', limit: nil, precision: nil, scale: nil, default: nil
85
85
  # Our type methods.
86
86
  columns['real_col'].sql_type.must_equal 'real'
87
87
  columns['money_col'].sql_type.must_equal 'money'
@@ -107,14 +107,14 @@ class SchemaDumperTestSQLServer < ActiveRecord::TestCase
107
107
  assert_line :smallmoney_col, type: 'smallmoney', limit: nil, precision: 10, scale: 4, default: nil
108
108
  assert_line :char_col, type: 'char', limit: 1, precision: nil, scale: nil, default: nil
109
109
  assert_line :varchar_col, type: 'varchar', limit: nil, precision: nil, scale: nil, default: nil
110
- assert_line :text_basic_col, type: 'text_basic', limit: 2147483647, precision: nil, scale: nil, default: nil
110
+ assert_line :text_basic_col, type: 'text_basic', limit: nil, precision: nil, scale: nil, default: nil
111
111
  assert_line :nchar_col, type: 'nchar', limit: 1, precision: nil, scale: nil, default: nil
112
- assert_line :ntext_col, type: 'ntext', limit: 2147483647, precision: nil, scale: nil, default: nil
112
+ assert_line :ntext_col, type: 'ntext', limit: nil, precision: nil, scale: nil, default: nil
113
113
  assert_line :binary_basic_col, type: 'binary_basic', limit: 1, precision: nil, scale: nil, default: nil
114
114
  assert_line :varbinary_col, type: 'varbinary', limit: nil, precision: nil, scale: nil, default: nil
115
115
  assert_line :uuid_col, type: 'uuid', limit: nil, precision: nil, scale: nil, default: nil
116
116
  assert_line :sstimestamp_col, type: 'ss_timestamp', limit: nil, precision: nil, scale: nil, default: nil
117
- assert_line :json_col, type: 'text', limit: 2147483647, precision: nil, scale: nil, default: nil
117
+ assert_line :json_col, type: 'text', limit: nil, precision: nil, scale: nil, default: nil
118
118
  end
119
119
 
120
120
  # Special Cases
@@ -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
@@ -0,0 +1,31 @@
1
+ # encoding: UTF-8
2
+ require 'cases/helper_sqlserver'
3
+
4
+ class SQLServerTriggerTest < ActiveRecord::TestCase
5
+ after { exclude_output_inserted_table_names.clear }
6
+
7
+ let(:exclude_output_inserted_table_names) do
8
+ ActiveRecord::ConnectionAdapters::SQLServerAdapter.exclude_output_inserted_table_names
9
+ end
10
+
11
+ it 'can insert into a table with output inserted - with a true setting for table name' do
12
+ exclude_output_inserted_table_names['sst_table_with_trigger'] = true
13
+ assert SSTestTriggerHistory.all.empty?
14
+ obj = SSTestTrigger.create! event_name: 'test trigger'
15
+ ['Fixnum', 'Integer'].must_include obj.id.class.name
16
+ obj.event_name.must_equal 'test trigger'
17
+ obj.id.must_be :present?
18
+ obj.id.to_s.must_equal SSTestTriggerHistory.first.id_source
19
+ end
20
+
21
+ it 'can insert into a table with output inserted - with a uniqueidentifier value' do
22
+ skip 'OUTPUT.inserted not supported at this point' if defined? JRUBY_VERSION
23
+ exclude_output_inserted_table_names['sst_table_with_uuid_trigger'] = 'uniqueidentifier'
24
+ assert SSTestTriggerHistory.all.empty?
25
+ obj = SSTestTriggerUuid.create! event_name: 'test uuid trigger'
26
+ obj.id.class.name.must_equal 'String'
27
+ obj.event_name.must_equal 'test uuid trigger'
28
+ obj.id.must_be :present?
29
+ obj.id.to_s.must_equal SSTestTriggerHistory.first.id_source
30
+ end
31
+ end
data/test/config.yml CHANGED
@@ -19,7 +19,7 @@ connections:
19
19
  dataserver: <%= ENV['ACTIVERECORD_UNITTEST_DATASERVER'] %>
20
20
  tds_version: <%= ENV['ACTIVERECORD_UNITTEST_TDSVERSION'] %>
21
21
  azure: <%= !ENV['ACTIVERECORD_UNITTEST_AZURE'].nil? %>
22
- timeout: <%= ENV['ACTIVERECORD_UNITTEST_AZURE'].present? ? 20 : nil %>
22
+ timeout: <%= ENV['ACTIVERECORD_UNITTEST_AZURE'].present? ? 20 : 10 %>
23
23
  arunit2:
24
24
  <<: *default_connection_info
25
25
  database: activerecord_unittest2
@@ -27,7 +27,7 @@ connections:
27
27
  dataserver: <%= ENV['ACTIVERECORD_UNITTEST_DATASERVER'] %>
28
28
  tds_version: <%= ENV['ACTIVERECORD_UNITTEST_TDSVERSION'] %>
29
29
  azure: <%= !ENV['ACTIVERECORD_UNITTEST_AZURE'].nil? %>
30
- timeout: <%= ENV['ACTIVERECORD_UNITTEST_AZURE'].present? ? 20 : nil %>
30
+ timeout: <%= ENV['ACTIVERECORD_UNITTEST_AZURE'].present? ? 20 : 10 %>
31
31
 
32
32
  jdbc:
33
33
  arunit:
@@ -0,0 +1,7 @@
1
+ class SSTestTrigger < ActiveRecord::Base
2
+ self.table_name = 'sst_table_with_trigger'
3
+ end
4
+
5
+ class SSTestTriggerUuid < ActiveRecord::Base
6
+ self.table_name = 'sst_table_with_uuid_trigger'
7
+ end
@@ -0,0 +1,3 @@
1
+ class SSTestTriggerHistory < ActiveRecord::Base
2
+ self.table_name = 'sst_table_with_trigger_history'
3
+ end
@@ -64,10 +64,6 @@ ActiveRecord::Schema.define do
64
64
  t.uuid :uuid_nil_default, default: nil
65
65
  end
66
66
 
67
- create_table '[some.Name]', force: true do |t|
68
- t.varchar :name
69
- end
70
-
71
67
  create_table 'sst_my$strange_table', force: true do |t|
72
68
  t.string :name
73
69
  end
@@ -148,7 +144,7 @@ ActiveRecord::Schema.define do
148
144
 
149
145
  # Constraints
150
146
 
151
- create_table(:sst_has_fks, force: true) { |t| t.column(:fk_id, :integer, null: false) }
147
+ create_table(:sst_has_fks, force: true) { |t| t.column(:fk_id, :bigint, null: false) }
152
148
  create_table(:sst_has_pks, force: true) { }
153
149
  execute <<-ADDFKSQL
154
150
  ALTER TABLE sst_has_fks
@@ -181,6 +177,44 @@ ActiveRecord::Schema.define do
181
177
  FROM sst_string_defaults
182
178
  STRINGDEFAULTSBIGVIEW
183
179
 
180
+ # Trigger
181
+
182
+ execute "IF EXISTS(SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'sst_table_with_trigger') DROP TABLE sst_table_with_trigger"
183
+ execute "IF EXISTS(SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'sst_table_with_trigger_history') DROP TABLE sst_table_with_trigger_history"
184
+ execute <<-SQL
185
+ CREATE TABLE sst_table_with_trigger(
186
+ id bigint IDENTITY NOT NULL PRIMARY KEY,
187
+ event_name nvarchar(255)
188
+ )
189
+ CREATE TABLE sst_table_with_trigger_history(
190
+ id bigint IDENTITY NOT NULL PRIMARY KEY,
191
+ id_source nvarchar(36),
192
+ event_name nvarchar(255)
193
+ )
194
+ SQL
195
+ execute <<-SQL
196
+ CREATE TRIGGER sst_table_with_trigger_t ON sst_table_with_trigger
197
+ FOR INSERT
198
+ AS
199
+ INSERT INTO sst_table_with_trigger_history (id_source, event_name)
200
+ SELECT id AS id_source, event_name FROM INSERTED
201
+ SQL
202
+
203
+ execute "IF EXISTS(SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'sst_table_with_uuid_trigger') DROP TABLE sst_table_with_uuid_trigger"
204
+ execute <<-SQL
205
+ CREATE TABLE sst_table_with_uuid_trigger(
206
+ id uniqueidentifier DEFAULT NEWID() PRIMARY KEY,
207
+ event_name nvarchar(255)
208
+ )
209
+ SQL
210
+ execute <<-SQL
211
+ CREATE TRIGGER sst_table_with_uuid_trigger_t ON sst_table_with_uuid_trigger
212
+ FOR INSERT
213
+ AS
214
+ INSERT INTO sst_table_with_trigger_history (id_source, event_name)
215
+ SELECT id AS id_source, event_name FROM INSERTED
216
+ SQL
217
+
184
218
  # Another schema.
185
219
 
186
220
  create_table :sst_schema_columns, force: true do |t|
@@ -13,7 +13,7 @@ module ARTest
13
13
  end
14
14
 
15
15
  ignored_sql = [
16
- /INFORMATION_SCHEMA\.(TABLES|VIEWS|COLUMNS)/im,
16
+ /INFORMATION_SCHEMA\.(TABLES|VIEWS|COLUMNS|KEY_COLUMN_USAGE)/im,
17
17
  /SELECT @@version/,
18
18
  /SELECT @@TRANCOUNT/,
19
19
  /(BEGIN|COMMIT|ROLLBACK|SAVE) TRANSACTION/,
@@ -21,7 +21,8 @@ module ARTest
21
21
  /SELECT DATABASEPROPERTYEX/im
22
22
  ]
23
23
 
24
- ActiveRecord::SQLCounter.ignored_sql.concat(ignored_sql)
24
+ sqlcounter = ObjectSpace.each_object(ActiveRecord::SQLCounter).to_a.first
25
+ sqlcounter.instance_variable_set :@ignore, Regexp.union(ignored_sql.push(sqlcounter.ignore))
25
26
 
26
27
  end
27
28
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-jdbcsqlserver-adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 50.1.0
4
+ version: 51.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ken Collins
@@ -15,42 +15,42 @@ authors:
15
15
  autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
- date: 2020-12-18 00:00:00.000000000 Z
18
+ date: 2019-11-11 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  requirement: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - "~>"
24
24
  - !ruby/object:Gem::Version
25
- version: 5.0.0
25
+ version: 5.1.0
26
26
  - - ">="
27
27
  - !ruby/object:Gem::Version
28
- version: 5.0.6
28
+ version: 5.1.7
29
29
  name: activerecord
30
- type: :runtime
31
30
  prerelease: false
31
+ type: :runtime
32
32
  version_requirements: !ruby/object:Gem::Requirement
33
33
  requirements:
34
34
  - - "~>"
35
35
  - !ruby/object:Gem::Version
36
- version: 5.0.0
36
+ version: 5.1.0
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: 5.0.6
39
+ version: 5.1.7
40
40
  - !ruby/object:Gem::Dependency
41
41
  requirement: !ruby/object:Gem::Requirement
42
42
  requirements:
43
43
  - - "~>"
44
44
  - !ruby/object:Gem::Version
45
- version: '50.8'
45
+ version: '51.5'
46
46
  name: activerecord-jdbc-adapter
47
- type: :runtime
48
47
  prerelease: false
48
+ type: :runtime
49
49
  version_requirements: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '50.8'
53
+ version: '51.5'
54
54
  - !ruby/object:Gem::Dependency
55
55
  requirement: !ruby/object:Gem::Requirement
56
56
  requirements:
@@ -58,8 +58,8 @@ dependencies:
58
58
  - !ruby/object:Gem::Version
59
59
  version: 0.6.0
60
60
  name: jdbc-mssql
61
- type: :runtime
62
61
  prerelease: false
62
+ type: :runtime
63
63
  version_requirements: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - ">="
@@ -76,13 +76,13 @@ extra_rdoc_files: []
76
76
  files:
77
77
  - ".gitignore"
78
78
  - ".travis.yml"
79
+ - BACKERS.md
79
80
  - CHANGELOG.md
80
81
  - CODE_OF_CONDUCT.md
81
82
  - Dockerfile
82
83
  - Gemfile
83
84
  - Guardfile
84
85
  - MIT-LICENSE
85
- - RAILS5-TODO.md
86
86
  - README.md
87
87
  - RUNNING_UNIT_TESTS.md
88
88
  - Rakefile
@@ -92,6 +92,7 @@ files:
92
92
  - docker-compose.ci.yml
93
93
  - lib/active_record/connection_adapters/sqlserver/core_ext/active_record.rb
94
94
  - lib/active_record/connection_adapters/sqlserver/core_ext/attribute_methods.rb
95
+ - lib/active_record/connection_adapters/sqlserver/core_ext/calculations.rb
95
96
  - lib/active_record/connection_adapters/sqlserver/core_ext/date_time.rb
96
97
  - lib/active_record/connection_adapters/sqlserver/core_ext/explain.rb
97
98
  - lib/active_record/connection_adapters/sqlserver/core_ext/explain_subscriber.rb
@@ -156,9 +157,9 @@ files:
156
157
  - lib/activerecord-sqlserver-adapter.rb
157
158
  - lib/arel/visitors/sqlserver.rb
158
159
  - lib/arel_sqlserver.rb
159
- - lib/jdbc_mssql_driver_loader.rb
160
160
  - test/appveyor/dbsetup.ps1
161
161
  - test/appveyor/dbsetup.sql
162
+ - test/bin/setup.sh
162
163
  - test/bin/wait-for.sh
163
164
  - test/cases/adapter_test_sqlserver.rb
164
165
  - test/cases/coerced_tests.rb
@@ -180,6 +181,7 @@ files:
180
181
  - test/cases/showplan_test_sqlserver.rb
181
182
  - test/cases/specific_schema_test_sqlserver.rb
182
183
  - test/cases/transaction_test_sqlserver.rb
184
+ - test/cases/trigger_test_sqlserver.rb
183
185
  - test/cases/utils_test_sqlserver.rb
184
186
  - test/cases/uuid_test_sqlserver.rb
185
187
  - test/config.yml
@@ -191,7 +193,6 @@ files:
191
193
  - test/models/sqlserver/datatype.rb
192
194
  - test/models/sqlserver/datatype_migration.rb
193
195
  - test/models/sqlserver/dollar_table_name.rb
194
- - test/models/sqlserver/dot_table_name.rb
195
196
  - test/models/sqlserver/edge_schema.rb
196
197
  - test/models/sqlserver/fk_has_fk.rb
197
198
  - test/models/sqlserver/fk_has_pk.rb
@@ -207,6 +208,8 @@ files:
207
208
  - test/models/sqlserver/string_defaults_big_view.rb
208
209
  - test/models/sqlserver/string_defaults_view.rb
209
210
  - test/models/sqlserver/tinyint_pk.rb
211
+ - test/models/sqlserver/trigger.rb
212
+ - test/models/sqlserver/trigger_history.rb
210
213
  - test/models/sqlserver/upper.rb
211
214
  - test/models/sqlserver/uppered.rb
212
215
  - test/models/sqlserver/uuid.rb
@@ -240,13 +243,15 @@ required_rubygems_version: !ruby/object:Gem::Requirement
240
243
  - !ruby/object:Gem::Version
241
244
  version: '0'
242
245
  requirements: []
243
- rubygems_version: 3.0.6
246
+ rubyforge_project:
247
+ rubygems_version: 2.7.9
244
248
  signing_key:
245
249
  specification_version: 4
246
250
  summary: ActiveRecord JDBC SQL Server Adapter.
247
251
  test_files:
248
252
  - test/appveyor/dbsetup.ps1
249
253
  - test/appveyor/dbsetup.sql
254
+ - test/bin/setup.sh
250
255
  - test/bin/wait-for.sh
251
256
  - test/cases/adapter_test_sqlserver.rb
252
257
  - test/cases/coerced_tests.rb
@@ -268,6 +273,7 @@ test_files:
268
273
  - test/cases/showplan_test_sqlserver.rb
269
274
  - test/cases/specific_schema_test_sqlserver.rb
270
275
  - test/cases/transaction_test_sqlserver.rb
276
+ - test/cases/trigger_test_sqlserver.rb
271
277
  - test/cases/utils_test_sqlserver.rb
272
278
  - test/cases/uuid_test_sqlserver.rb
273
279
  - test/config.yml
@@ -279,7 +285,6 @@ test_files:
279
285
  - test/models/sqlserver/datatype.rb
280
286
  - test/models/sqlserver/datatype_migration.rb
281
287
  - test/models/sqlserver/dollar_table_name.rb
282
- - test/models/sqlserver/dot_table_name.rb
283
288
  - test/models/sqlserver/edge_schema.rb
284
289
  - test/models/sqlserver/fk_has_fk.rb
285
290
  - test/models/sqlserver/fk_has_pk.rb
@@ -295,6 +300,8 @@ test_files:
295
300
  - test/models/sqlserver/string_defaults_big_view.rb
296
301
  - test/models/sqlserver/string_defaults_view.rb
297
302
  - test/models/sqlserver/tinyint_pk.rb
303
+ - test/models/sqlserver/trigger.rb
304
+ - test/models/sqlserver/trigger_history.rb
298
305
  - test/models/sqlserver/upper.rb
299
306
  - test/models/sqlserver/uppered.rb
300
307
  - test/models/sqlserver/uuid.rb
data/RAILS5-TODO.md DELETED
@@ -1,5 +0,0 @@
1
-
2
- ## Rails v5.1
3
-
4
- * BIGINT PK support. https://github.com/rails/rails/pull/26266
5
-
@@ -1,22 +0,0 @@
1
- module JdbcMssqlDriverLoader
2
- def self.check_and_maybe_load_driver
3
- driver_name = "com.microsoft.sqlserver.jdbc.SQLServerDriver"
4
- if (Java::JavaClass.for_name(driver_name) rescue nil)
5
- driver = Java::ComMicrosoftSqlserverJdbc::SQLServerDriver.new
6
- which = driver
7
- .getClass().getClassLoader().loadClass(driver_name)
8
- .getProtectionDomain().getCodeSource().getLocation().to_s
9
- warn "You already required a mssql jdbc driver (#{which}), skipping gem jdbc-mssql"
10
-
11
- major_version = driver.major_version
12
- required_major_version = 8
13
- if major_version < required_major_version
14
- raise "MSSQL jdbc driver version is to old (given major version #{major_version} < required major version #{required_major_version})"
15
- end
16
- else
17
- require "jdbc/mssql"
18
- end
19
- end
20
-
21
- check_and_maybe_load_driver
22
- end
@@ -1,3 +0,0 @@
1
- class SSTestDotTableName < ActiveRecord::Base
2
- self.table_name = '[dbo].[some.Name]'
3
- end