activerecord-import 0.22.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.github/workflows/test.yaml +107 -0
- data/.gitignore +1 -0
- data/.rubocop.yml +74 -8
- data/Brewfile +3 -1
- data/CHANGELOG.md +235 -3
- data/Gemfile +22 -15
- data/LICENSE +21 -56
- data/README.markdown +574 -22
- data/Rakefile +4 -1
- data/activerecord-import.gemspec +6 -5
- data/benchmarks/benchmark.rb +7 -1
- data/benchmarks/lib/base.rb +2 -0
- data/benchmarks/lib/cli_parser.rb +3 -1
- data/benchmarks/lib/float.rb +2 -0
- data/benchmarks/lib/mysql2_benchmark.rb +2 -0
- data/benchmarks/lib/output_to_csv.rb +2 -0
- data/benchmarks/lib/output_to_html.rb +4 -2
- data/benchmarks/models/test_innodb.rb +2 -0
- data/benchmarks/models/test_memory.rb +2 -0
- data/benchmarks/models/test_myisam.rb +2 -0
- data/benchmarks/schema/{mysql_schema.rb → mysql2_schema.rb} +2 -0
- data/gemfiles/4.2.gemfile +2 -0
- data/gemfiles/5.0.gemfile +2 -0
- data/gemfiles/5.1.gemfile +2 -0
- data/gemfiles/5.2.gemfile +4 -0
- data/gemfiles/6.0.gemfile +4 -0
- data/gemfiles/6.1.gemfile +4 -0
- data/gemfiles/7.0.gemfile +4 -0
- data/lib/activerecord-import/active_record/adapters/abstract_adapter.rb +2 -0
- data/lib/activerecord-import/active_record/adapters/jdbcmysql_adapter.rb +6 -4
- data/lib/activerecord-import/active_record/adapters/jdbcpostgresql_adapter.rb +2 -0
- data/lib/activerecord-import/active_record/adapters/jdbcsqlite3_adapter.rb +2 -0
- data/lib/activerecord-import/active_record/adapters/mysql2_adapter.rb +2 -0
- data/lib/activerecord-import/active_record/adapters/postgresql_adapter.rb +2 -0
- data/lib/activerecord-import/active_record/adapters/seamless_database_pool_adapter.rb +2 -0
- data/lib/activerecord-import/active_record/adapters/sqlite3_adapter.rb +2 -0
- data/lib/activerecord-import/adapters/abstract_adapter.rb +10 -2
- data/lib/activerecord-import/adapters/em_mysql2_adapter.rb +2 -0
- data/lib/activerecord-import/adapters/mysql2_adapter.rb +2 -0
- data/lib/activerecord-import/adapters/mysql_adapter.rb +19 -11
- data/lib/activerecord-import/adapters/postgresql_adapter.rb +56 -37
- data/lib/activerecord-import/adapters/sqlite3_adapter.rb +128 -9
- data/lib/activerecord-import/base.rb +12 -2
- data/lib/activerecord-import/import.rb +300 -136
- data/lib/activerecord-import/mysql2.rb +2 -0
- data/lib/activerecord-import/postgresql.rb +2 -0
- data/lib/activerecord-import/sqlite3.rb +2 -0
- data/lib/activerecord-import/synchronize.rb +4 -2
- data/lib/activerecord-import/value_sets_parser.rb +4 -0
- data/lib/activerecord-import/version.rb +3 -1
- data/lib/activerecord-import.rb +4 -1
- data/test/adapters/jdbcmysql.rb +2 -0
- data/test/adapters/jdbcpostgresql.rb +2 -0
- data/test/adapters/jdbcsqlite3.rb +2 -0
- data/test/adapters/makara_postgis.rb +3 -0
- data/test/adapters/mysql2.rb +2 -0
- data/test/adapters/mysql2_makara.rb +2 -0
- data/test/adapters/mysql2spatial.rb +2 -0
- data/test/adapters/postgis.rb +2 -0
- data/test/adapters/postgresql.rb +2 -0
- data/test/adapters/postgresql_makara.rb +2 -0
- data/test/adapters/seamless_database_pool.rb +2 -0
- data/test/adapters/spatialite.rb +2 -0
- data/test/adapters/sqlite3.rb +2 -0
- data/test/{travis → github}/database.yml +3 -1
- data/test/import_test.rb +159 -8
- data/test/jdbcmysql/import_test.rb +2 -0
- data/test/jdbcpostgresql/import_test.rb +2 -0
- data/test/jdbcsqlite3/import_test.rb +2 -0
- data/test/makara_postgis/import_test.rb +10 -0
- data/test/models/account.rb +5 -0
- data/test/models/alarm.rb +2 -0
- data/test/models/animal.rb +8 -0
- data/test/models/bike_maker.rb +9 -0
- data/test/models/book.rb +2 -0
- data/test/models/car.rb +2 -0
- data/test/models/card.rb +5 -0
- data/test/models/chapter.rb +2 -0
- data/test/models/customer.rb +8 -0
- data/test/models/deck.rb +8 -0
- data/test/models/dictionary.rb +2 -0
- data/test/models/discount.rb +2 -0
- data/test/models/end_note.rb +2 -0
- data/test/models/group.rb +2 -0
- data/test/models/order.rb +8 -0
- data/test/models/playing_card.rb +4 -0
- data/test/models/promotion.rb +2 -0
- data/test/models/question.rb +2 -0
- data/test/models/rule.rb +2 -0
- data/test/models/tag.rb +3 -0
- data/test/models/tag_alias.rb +5 -0
- data/test/models/topic.rb +2 -0
- data/test/models/user.rb +5 -0
- data/test/models/user_token.rb +6 -0
- data/test/models/vendor.rb +2 -0
- data/test/models/widget.rb +2 -0
- data/test/mysql2/import_test.rb +2 -0
- data/test/mysql2_makara/import_test.rb +2 -0
- data/test/mysqlspatial2/import_test.rb +2 -0
- data/test/postgis/import_test.rb +2 -0
- data/test/postgresql/import_test.rb +2 -0
- data/test/schema/generic_schema.rb +53 -0
- data/test/schema/jdbcpostgresql_schema.rb +2 -0
- data/test/schema/mysql2_schema.rb +21 -0
- data/test/schema/postgis_schema.rb +2 -0
- data/test/schema/postgresql_schema.rb +18 -0
- data/test/schema/sqlite3_schema.rb +15 -0
- data/test/schema/version.rb +2 -0
- data/test/sqlite3/import_test.rb +2 -0
- data/test/support/active_support/test_case_extensions.rb +2 -0
- data/test/support/assertions.rb +2 -0
- data/test/support/factories.rb +10 -8
- data/test/support/generate.rb +10 -8
- data/test/support/mysql/import_examples.rb +14 -1
- data/test/support/postgresql/import_examples.rb +140 -3
- data/test/support/shared_examples/on_duplicate_key_ignore.rb +2 -0
- data/test/support/shared_examples/on_duplicate_key_update.rb +263 -0
- data/test/support/shared_examples/recursive_import.rb +76 -4
- data/test/support/sqlite3/import_examples.rb +191 -26
- data/test/synchronize_test.rb +2 -0
- data/test/test_helper.rb +36 -3
- data/test/value_sets_bytes_parser_test.rb +2 -0
- data/test/value_sets_records_parser_test.rb +2 -0
- metadata +46 -18
- data/.travis.yml +0 -61
- data/gemfiles/3.2.gemfile +0 -2
- data/gemfiles/4.0.gemfile +0 -2
- data/gemfiles/4.1.gemfile +0 -2
- data/test/schema/mysql_schema.rb +0 -16
data/test/test_helper.rb
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'pathname'
|
|
4
|
+
require 'rake'
|
|
2
5
|
test_dir = Pathname.new File.dirname(__FILE__)
|
|
3
6
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
|
4
7
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
|
@@ -33,6 +36,14 @@ rescue LoadError
|
|
|
33
36
|
ENV["SKIP_COMPOSITE_PK"] = "true"
|
|
34
37
|
end
|
|
35
38
|
|
|
39
|
+
# Support MySQL 5.7
|
|
40
|
+
if ActiveSupport::VERSION::STRING < "4.1"
|
|
41
|
+
require "active_record/connection_adapters/mysql2_adapter"
|
|
42
|
+
class ActiveRecord::ConnectionAdapters::Mysql2Adapter
|
|
43
|
+
NATIVE_DATABASE_TYPES[:primary_key] = "int(11) auto_increment PRIMARY KEY"
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
36
47
|
require "ruby-debug" if RUBY_VERSION.to_f < 1.9
|
|
37
48
|
|
|
38
49
|
adapter = ENV["ARE_DB"] || "sqlite3"
|
|
@@ -40,8 +51,30 @@ adapter = ENV["ARE_DB"] || "sqlite3"
|
|
|
40
51
|
FileUtils.mkdir_p 'log'
|
|
41
52
|
ActiveRecord::Base.logger = Logger.new("log/test.log")
|
|
42
53
|
ActiveRecord::Base.logger.level = Logger::DEBUG
|
|
43
|
-
|
|
44
|
-
ActiveRecord
|
|
54
|
+
|
|
55
|
+
if ActiveRecord.respond_to?(:use_yaml_unsafe_load)
|
|
56
|
+
ActiveRecord.use_yaml_unsafe_load = true
|
|
57
|
+
elsif ActiveRecord::Base.respond_to?(:use_yaml_unsafe_load)
|
|
58
|
+
ActiveRecord::Base.use_yaml_unsafe_load = true
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
if ENV['AR_VERSION'].to_f >= 6.0
|
|
62
|
+
yaml_config = if Gem::Version.new(Psych::VERSION) >= Gem::Version.new('3.2.1')
|
|
63
|
+
YAML.safe_load_file(test_dir.join("database.yml"), aliases: true)[adapter]
|
|
64
|
+
else
|
|
65
|
+
YAML.load_file(test_dir.join("database.yml"))[adapter]
|
|
66
|
+
end
|
|
67
|
+
config = ActiveRecord::DatabaseConfigurations::HashConfig.new("test", adapter, yaml_config)
|
|
68
|
+
ActiveRecord::Base.configurations.configurations << config
|
|
69
|
+
else
|
|
70
|
+
ActiveRecord::Base.configurations["test"] = YAML.load_file(test_dir.join("database.yml"))[adapter]
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
if ActiveRecord.respond_to?(:default_timezone)
|
|
74
|
+
ActiveRecord.default_timezone = :utc
|
|
75
|
+
else
|
|
76
|
+
ActiveRecord::Base.default_timezone = :utc
|
|
77
|
+
end
|
|
45
78
|
|
|
46
79
|
require "activerecord-import"
|
|
47
80
|
ActiveRecord::Base.establish_connection :test
|
|
@@ -50,7 +83,7 @@ ActiveSupport::Notifications.subscribe(/active_record.sql/) do |_, _, _, _, hsh|
|
|
|
50
83
|
ActiveRecord::Base.logger.info hsh[:sql]
|
|
51
84
|
end
|
|
52
85
|
|
|
53
|
-
require "
|
|
86
|
+
require "factory_bot"
|
|
54
87
|
Dir[File.dirname(__FILE__) + "/support/**/*.rb"].each { |file| require file }
|
|
55
88
|
|
|
56
89
|
# Load base/generic schema
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: activerecord-import
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 1.4.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Zach Dennis
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2022-10-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '
|
|
19
|
+
version: '4.2'
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - ">="
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: '
|
|
26
|
+
version: '4.2'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: rake
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -45,10 +45,10 @@ executables: []
|
|
|
45
45
|
extensions: []
|
|
46
46
|
extra_rdoc_files: []
|
|
47
47
|
files:
|
|
48
|
+
- ".github/workflows/test.yaml"
|
|
48
49
|
- ".gitignore"
|
|
49
50
|
- ".rubocop.yml"
|
|
50
51
|
- ".rubocop_todo.yml"
|
|
51
|
-
- ".travis.yml"
|
|
52
52
|
- Brewfile
|
|
53
53
|
- CHANGELOG.md
|
|
54
54
|
- Gemfile
|
|
@@ -67,13 +67,14 @@ files:
|
|
|
67
67
|
- benchmarks/models/test_innodb.rb
|
|
68
68
|
- benchmarks/models/test_memory.rb
|
|
69
69
|
- benchmarks/models/test_myisam.rb
|
|
70
|
-
- benchmarks/schema/
|
|
71
|
-
- gemfiles/3.2.gemfile
|
|
72
|
-
- gemfiles/4.0.gemfile
|
|
73
|
-
- gemfiles/4.1.gemfile
|
|
70
|
+
- benchmarks/schema/mysql2_schema.rb
|
|
74
71
|
- gemfiles/4.2.gemfile
|
|
75
72
|
- gemfiles/5.0.gemfile
|
|
76
73
|
- gemfiles/5.1.gemfile
|
|
74
|
+
- gemfiles/5.2.gemfile
|
|
75
|
+
- gemfiles/6.0.gemfile
|
|
76
|
+
- gemfiles/6.1.gemfile
|
|
77
|
+
- gemfiles/7.0.gemfile
|
|
77
78
|
- lib/activerecord-import.rb
|
|
78
79
|
- lib/activerecord-import/active_record/adapters/abstract_adapter.rb
|
|
79
80
|
- lib/activerecord-import/active_record/adapters/jdbcmysql_adapter.rb
|
|
@@ -100,6 +101,7 @@ files:
|
|
|
100
101
|
- test/adapters/jdbcmysql.rb
|
|
101
102
|
- test/adapters/jdbcpostgresql.rb
|
|
102
103
|
- test/adapters/jdbcsqlite3.rb
|
|
104
|
+
- test/adapters/makara_postgis.rb
|
|
103
105
|
- test/adapters/mysql2.rb
|
|
104
106
|
- test/adapters/mysql2_makara.rb
|
|
105
107
|
- test/adapters/mysql2spatial.rb
|
|
@@ -110,23 +112,36 @@ files:
|
|
|
110
112
|
- test/adapters/spatialite.rb
|
|
111
113
|
- test/adapters/sqlite3.rb
|
|
112
114
|
- test/database.yml.sample
|
|
115
|
+
- test/github/database.yml
|
|
113
116
|
- test/import_test.rb
|
|
114
117
|
- test/jdbcmysql/import_test.rb
|
|
115
118
|
- test/jdbcpostgresql/import_test.rb
|
|
116
119
|
- test/jdbcsqlite3/import_test.rb
|
|
120
|
+
- test/makara_postgis/import_test.rb
|
|
121
|
+
- test/models/account.rb
|
|
117
122
|
- test/models/alarm.rb
|
|
123
|
+
- test/models/animal.rb
|
|
124
|
+
- test/models/bike_maker.rb
|
|
118
125
|
- test/models/book.rb
|
|
119
126
|
- test/models/car.rb
|
|
127
|
+
- test/models/card.rb
|
|
120
128
|
- test/models/chapter.rb
|
|
129
|
+
- test/models/customer.rb
|
|
130
|
+
- test/models/deck.rb
|
|
121
131
|
- test/models/dictionary.rb
|
|
122
132
|
- test/models/discount.rb
|
|
123
133
|
- test/models/end_note.rb
|
|
124
134
|
- test/models/group.rb
|
|
135
|
+
- test/models/order.rb
|
|
136
|
+
- test/models/playing_card.rb
|
|
125
137
|
- test/models/promotion.rb
|
|
126
138
|
- test/models/question.rb
|
|
127
139
|
- test/models/rule.rb
|
|
128
140
|
- test/models/tag.rb
|
|
141
|
+
- test/models/tag_alias.rb
|
|
129
142
|
- test/models/topic.rb
|
|
143
|
+
- test/models/user.rb
|
|
144
|
+
- test/models/user_token.rb
|
|
130
145
|
- test/models/vendor.rb
|
|
131
146
|
- test/models/widget.rb
|
|
132
147
|
- test/mysql2/import_test.rb
|
|
@@ -136,9 +151,10 @@ files:
|
|
|
136
151
|
- test/postgresql/import_test.rb
|
|
137
152
|
- test/schema/generic_schema.rb
|
|
138
153
|
- test/schema/jdbcpostgresql_schema.rb
|
|
139
|
-
- test/schema/
|
|
154
|
+
- test/schema/mysql2_schema.rb
|
|
140
155
|
- test/schema/postgis_schema.rb
|
|
141
156
|
- test/schema/postgresql_schema.rb
|
|
157
|
+
- test/schema/sqlite3_schema.rb
|
|
142
158
|
- test/schema/version.rb
|
|
143
159
|
- test/sqlite3/import_test.rb
|
|
144
160
|
- test/support/active_support/test_case_extensions.rb
|
|
@@ -153,12 +169,11 @@ files:
|
|
|
153
169
|
- test/support/sqlite3/import_examples.rb
|
|
154
170
|
- test/synchronize_test.rb
|
|
155
171
|
- test/test_helper.rb
|
|
156
|
-
- test/travis/database.yml
|
|
157
172
|
- test/value_sets_bytes_parser_test.rb
|
|
158
173
|
- test/value_sets_records_parser_test.rb
|
|
159
|
-
homepage:
|
|
174
|
+
homepage: https://github.com/zdennis/activerecord-import
|
|
160
175
|
licenses:
|
|
161
|
-
-
|
|
176
|
+
- MIT
|
|
162
177
|
metadata: {}
|
|
163
178
|
post_install_message:
|
|
164
179
|
rdoc_options: []
|
|
@@ -168,15 +183,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
168
183
|
requirements:
|
|
169
184
|
- - ">="
|
|
170
185
|
- !ruby/object:Gem::Version
|
|
171
|
-
version:
|
|
186
|
+
version: 2.4.0
|
|
172
187
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
173
188
|
requirements:
|
|
174
189
|
- - ">="
|
|
175
190
|
- !ruby/object:Gem::Version
|
|
176
191
|
version: '0'
|
|
177
192
|
requirements: []
|
|
178
|
-
|
|
179
|
-
rubygems_version: 2.6.13
|
|
193
|
+
rubygems_version: 3.0.3.1
|
|
180
194
|
signing_key:
|
|
181
195
|
specification_version: 4
|
|
182
196
|
summary: Bulk insert extension for ActiveRecord
|
|
@@ -184,6 +198,7 @@ test_files:
|
|
|
184
198
|
- test/adapters/jdbcmysql.rb
|
|
185
199
|
- test/adapters/jdbcpostgresql.rb
|
|
186
200
|
- test/adapters/jdbcsqlite3.rb
|
|
201
|
+
- test/adapters/makara_postgis.rb
|
|
187
202
|
- test/adapters/mysql2.rb
|
|
188
203
|
- test/adapters/mysql2_makara.rb
|
|
189
204
|
- test/adapters/mysql2spatial.rb
|
|
@@ -194,23 +209,36 @@ test_files:
|
|
|
194
209
|
- test/adapters/spatialite.rb
|
|
195
210
|
- test/adapters/sqlite3.rb
|
|
196
211
|
- test/database.yml.sample
|
|
212
|
+
- test/github/database.yml
|
|
197
213
|
- test/import_test.rb
|
|
198
214
|
- test/jdbcmysql/import_test.rb
|
|
199
215
|
- test/jdbcpostgresql/import_test.rb
|
|
200
216
|
- test/jdbcsqlite3/import_test.rb
|
|
217
|
+
- test/makara_postgis/import_test.rb
|
|
218
|
+
- test/models/account.rb
|
|
201
219
|
- test/models/alarm.rb
|
|
220
|
+
- test/models/animal.rb
|
|
221
|
+
- test/models/bike_maker.rb
|
|
202
222
|
- test/models/book.rb
|
|
203
223
|
- test/models/car.rb
|
|
224
|
+
- test/models/card.rb
|
|
204
225
|
- test/models/chapter.rb
|
|
226
|
+
- test/models/customer.rb
|
|
227
|
+
- test/models/deck.rb
|
|
205
228
|
- test/models/dictionary.rb
|
|
206
229
|
- test/models/discount.rb
|
|
207
230
|
- test/models/end_note.rb
|
|
208
231
|
- test/models/group.rb
|
|
232
|
+
- test/models/order.rb
|
|
233
|
+
- test/models/playing_card.rb
|
|
209
234
|
- test/models/promotion.rb
|
|
210
235
|
- test/models/question.rb
|
|
211
236
|
- test/models/rule.rb
|
|
212
237
|
- test/models/tag.rb
|
|
238
|
+
- test/models/tag_alias.rb
|
|
213
239
|
- test/models/topic.rb
|
|
240
|
+
- test/models/user.rb
|
|
241
|
+
- test/models/user_token.rb
|
|
214
242
|
- test/models/vendor.rb
|
|
215
243
|
- test/models/widget.rb
|
|
216
244
|
- test/mysql2/import_test.rb
|
|
@@ -220,9 +248,10 @@ test_files:
|
|
|
220
248
|
- test/postgresql/import_test.rb
|
|
221
249
|
- test/schema/generic_schema.rb
|
|
222
250
|
- test/schema/jdbcpostgresql_schema.rb
|
|
223
|
-
- test/schema/
|
|
251
|
+
- test/schema/mysql2_schema.rb
|
|
224
252
|
- test/schema/postgis_schema.rb
|
|
225
253
|
- test/schema/postgresql_schema.rb
|
|
254
|
+
- test/schema/sqlite3_schema.rb
|
|
226
255
|
- test/schema/version.rb
|
|
227
256
|
- test/sqlite3/import_test.rb
|
|
228
257
|
- test/support/active_support/test_case_extensions.rb
|
|
@@ -237,6 +266,5 @@ test_files:
|
|
|
237
266
|
- test/support/sqlite3/import_examples.rb
|
|
238
267
|
- test/synchronize_test.rb
|
|
239
268
|
- test/test_helper.rb
|
|
240
|
-
- test/travis/database.yml
|
|
241
269
|
- test/value_sets_bytes_parser_test.rb
|
|
242
270
|
- test/value_sets_records_parser_test.rb
|
data/.travis.yml
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
language: ruby
|
|
2
|
-
cache: bundler
|
|
3
|
-
rvm:
|
|
4
|
-
- 2.3.5
|
|
5
|
-
|
|
6
|
-
env:
|
|
7
|
-
global:
|
|
8
|
-
# https://github.com/discourse/discourse/blob/master/.travis.yml
|
|
9
|
-
- RUBY_GC_MALLOC_LIMIT=50000000
|
|
10
|
-
matrix:
|
|
11
|
-
- AR_VERSION=3.2
|
|
12
|
-
- AR_VERSION=4.0
|
|
13
|
-
- AR_VERSION=4.1
|
|
14
|
-
- AR_VERSION=4.2
|
|
15
|
-
- AR_VERSION=5.0
|
|
16
|
-
- AR_VERSION=5.1
|
|
17
|
-
|
|
18
|
-
matrix:
|
|
19
|
-
include:
|
|
20
|
-
- rvm: jruby-9.1.14.0
|
|
21
|
-
env: AR_VERSION=4.2
|
|
22
|
-
before_install:
|
|
23
|
-
- gem update --system
|
|
24
|
-
|
|
25
|
-
script:
|
|
26
|
-
- bundle exec rake test:jdbcsqlite3
|
|
27
|
-
- bundle exec rake test:jdbcmysql
|
|
28
|
-
- bundle exec rake test:jdbcpostgresql
|
|
29
|
-
|
|
30
|
-
fast_finish: true
|
|
31
|
-
|
|
32
|
-
before_script:
|
|
33
|
-
- mysql -e 'create database activerecord_import_test;'
|
|
34
|
-
- psql -c 'create database activerecord_import_test;' -U postgres
|
|
35
|
-
- psql activerecord_import_test -c 'create extension if not exists hstore;' -U postgres
|
|
36
|
-
- psql -c 'create extension if not exists postgis;' -U postgres
|
|
37
|
-
- psql -c 'create extension if not exists "uuid-ossp";' -U postgres
|
|
38
|
-
- cp test/travis/database.yml test/database.yml
|
|
39
|
-
|
|
40
|
-
addons:
|
|
41
|
-
postgresql: "9.5"
|
|
42
|
-
apt:
|
|
43
|
-
sources:
|
|
44
|
-
- travis-ci/sqlite3
|
|
45
|
-
packages:
|
|
46
|
-
- sqlite3
|
|
47
|
-
- postgresql-9.5-postgis-2.3
|
|
48
|
-
|
|
49
|
-
script:
|
|
50
|
-
- bundle exec rake test:mysql2
|
|
51
|
-
- bundle exec rake test:mysql2_makara
|
|
52
|
-
- bundle exec rake test:mysql2spatial
|
|
53
|
-
- bundle exec rake test:postgis
|
|
54
|
-
- bundle exec rake test:postgresql
|
|
55
|
-
- bundle exec rake test:postgresql_makara
|
|
56
|
-
- bundle exec rake test:seamless_database_pool
|
|
57
|
-
- bundle exec rake test:spatialite
|
|
58
|
-
- bundle exec rake test:sqlite3
|
|
59
|
-
- bundle exec rubocop
|
|
60
|
-
|
|
61
|
-
dist: trusty
|
data/gemfiles/3.2.gemfile
DELETED
data/gemfiles/4.0.gemfile
DELETED
data/gemfiles/4.1.gemfile
DELETED
data/test/schema/mysql_schema.rb
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
ActiveRecord::Schema.define do
|
|
2
|
-
create_table :books, options: 'ENGINE=MyISAM', force: true do |t|
|
|
3
|
-
t.column :title, :string, null: false
|
|
4
|
-
t.column :publisher, :string, null: false, default: 'Default Publisher'
|
|
5
|
-
t.column :author_name, :string, null: false
|
|
6
|
-
t.column :created_at, :datetime
|
|
7
|
-
t.column :created_on, :datetime
|
|
8
|
-
t.column :updated_at, :datetime
|
|
9
|
-
t.column :updated_on, :datetime
|
|
10
|
-
t.column :publish_date, :date
|
|
11
|
-
t.column :topic_id, :integer
|
|
12
|
-
t.column :for_sale, :boolean, default: true
|
|
13
|
-
t.column :status, :integer
|
|
14
|
-
end
|
|
15
|
-
execute "ALTER TABLE books ADD FULLTEXT( `title`, `publisher`, `author_name` )"
|
|
16
|
-
end
|