departure 6.7.0 → 7.0.0

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.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test.yml +5 -14
  3. data/.gitignore +1 -0
  4. data/.rubocop.yml +1 -1
  5. data/Appraisals +4 -24
  6. data/CHANGELOG.md +15 -1
  7. data/Gemfile +6 -1
  8. data/Gemfile.lock +108 -86
  9. data/README.md +8 -0
  10. data/Rakefile +9 -0
  11. data/bin/rails +24 -0
  12. data/departure.gemspec +3 -3
  13. data/gemfiles/rails_7_0.gemfile +8 -2
  14. data/gemfiles/rails_7_0.gemfile.lock +182 -131
  15. data/gemfiles/rails_7_1.gemfile +7 -2
  16. data/gemfiles/rails_7_1.gemfile.lock +156 -140
  17. data/gemfiles/{ruby_2.7_rails_6_0.gemfile → rails_7_2.gemfile} +7 -3
  18. data/gemfiles/rails_7_2.gemfile.lock +288 -0
  19. data/gemfiles/{rails_6_0.gemfile → rails_8_0.gemfile} +6 -2
  20. data/gemfiles/rails_8_0.gemfile.lock +285 -0
  21. data/lib/active_record/connection_adapters/for_alter.rb +4 -17
  22. data/lib/active_record/connection_adapters/patch_connection_handling.rb +18 -0
  23. data/lib/active_record/connection_adapters/percona_adapter.rb +9 -56
  24. data/lib/active_record/connection_adapters/rails_7_2_departure_adapter.rb +215 -0
  25. data/lib/active_record/connection_adapters/rails_8_0_departure_adapter.rb +293 -0
  26. data/lib/departure/command.rb +6 -2
  27. data/lib/departure/configuration.rb +2 -1
  28. data/lib/departure/migration.rb +1 -5
  29. data/lib/departure/rails_adapter.rb +146 -0
  30. data/lib/departure/rails_patches/active_record_migrator_with_advisory_lock_patch.rb +25 -0
  31. data/lib/departure/runner.rb +24 -4
  32. data/lib/departure/version.rb +1 -1
  33. data/lib/departure.rb +2 -5
  34. data/lib/lhm/column_with_sql.rb +1 -8
  35. data/test_database.rb +2 -6
  36. metadata +18 -47
  37. data/gemfiles/rails_6_0.gemfile.lock +0 -238
  38. data/gemfiles/rails_6_1.gemfile +0 -10
  39. data/gemfiles/rails_6_1.gemfile.lock +0 -241
  40. data/gemfiles/ruby_2.7_rails_6_0.gemfile.lock +0 -239
  41. data/gemfiles/ruby_2.7_rails_6_1.gemfile +0 -11
  42. data/gemfiles/ruby_2.7_rails_6_1.gemfile.lock +0 -242
  43. data/gemfiles/ruby_2.7_rails_7_0.gemfile +0 -11
  44. data/gemfiles/ruby_2.7_rails_7_0.gemfile.lock +0 -241
  45. data/gemfiles/ruby_2.7_rails_7_1.gemfile +0 -11
  46. data/gemfiles/ruby_2.7_rails_7_1.gemfile.lock +0 -275
@@ -0,0 +1,288 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ departure (6.8.0)
5
+ activerecord (>= 7.0.1)
6
+ mysql2 (>= 0.4.0, < 0.6.0)
7
+ railties (>= 7.0.1)
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ actioncable (7.2.2.1)
13
+ actionpack (= 7.2.2.1)
14
+ activesupport (= 7.2.2.1)
15
+ nio4r (~> 2.0)
16
+ websocket-driver (>= 0.6.1)
17
+ zeitwerk (~> 2.6)
18
+ actionmailbox (7.2.2.1)
19
+ actionpack (= 7.2.2.1)
20
+ activejob (= 7.2.2.1)
21
+ activerecord (= 7.2.2.1)
22
+ activestorage (= 7.2.2.1)
23
+ activesupport (= 7.2.2.1)
24
+ mail (>= 2.8.0)
25
+ actionmailer (7.2.2.1)
26
+ actionpack (= 7.2.2.1)
27
+ actionview (= 7.2.2.1)
28
+ activejob (= 7.2.2.1)
29
+ activesupport (= 7.2.2.1)
30
+ mail (>= 2.8.0)
31
+ rails-dom-testing (~> 2.2)
32
+ actionpack (7.2.2.1)
33
+ actionview (= 7.2.2.1)
34
+ activesupport (= 7.2.2.1)
35
+ nokogiri (>= 1.8.5)
36
+ racc
37
+ rack (>= 2.2.4, < 3.2)
38
+ rack-session (>= 1.0.1)
39
+ rack-test (>= 0.6.3)
40
+ rails-dom-testing (~> 2.2)
41
+ rails-html-sanitizer (~> 1.6)
42
+ useragent (~> 0.16)
43
+ actiontext (7.2.2.1)
44
+ actionpack (= 7.2.2.1)
45
+ activerecord (= 7.2.2.1)
46
+ activestorage (= 7.2.2.1)
47
+ activesupport (= 7.2.2.1)
48
+ globalid (>= 0.6.0)
49
+ nokogiri (>= 1.8.5)
50
+ actionview (7.2.2.1)
51
+ activesupport (= 7.2.2.1)
52
+ builder (~> 3.1)
53
+ erubi (~> 1.11)
54
+ rails-dom-testing (~> 2.2)
55
+ rails-html-sanitizer (~> 1.6)
56
+ activejob (7.2.2.1)
57
+ activesupport (= 7.2.2.1)
58
+ globalid (>= 0.3.6)
59
+ activemodel (7.2.2.1)
60
+ activesupport (= 7.2.2.1)
61
+ activerecord (7.2.2.1)
62
+ activemodel (= 7.2.2.1)
63
+ activesupport (= 7.2.2.1)
64
+ timeout (>= 0.4.0)
65
+ activestorage (7.2.2.1)
66
+ actionpack (= 7.2.2.1)
67
+ activejob (= 7.2.2.1)
68
+ activerecord (= 7.2.2.1)
69
+ activesupport (= 7.2.2.1)
70
+ marcel (~> 1.0)
71
+ activesupport (7.2.2.1)
72
+ base64
73
+ benchmark (>= 0.3)
74
+ bigdecimal
75
+ concurrent-ruby (~> 1.0, >= 1.3.1)
76
+ connection_pool (>= 2.2.5)
77
+ drb
78
+ i18n (>= 1.6, < 2)
79
+ logger (>= 1.4.2)
80
+ minitest (>= 5.1)
81
+ securerandom (>= 0.3)
82
+ tzinfo (~> 2.0, >= 2.0.5)
83
+ appraisal (2.4.1)
84
+ bundler
85
+ rake
86
+ thor (>= 0.14.0)
87
+ ast (2.4.3)
88
+ base64 (0.2.0)
89
+ benchmark (0.4.0)
90
+ bigdecimal (3.1.9)
91
+ builder (3.3.0)
92
+ byebug (12.0.0)
93
+ climate_control (0.0.4)
94
+ activesupport (>= 3.0)
95
+ codeclimate-test-reporter (1.0.9)
96
+ simplecov (<= 0.13)
97
+ coderay (1.1.3)
98
+ concurrent-ruby (1.3.5)
99
+ connection_pool (2.5.0)
100
+ crass (1.0.6)
101
+ date (3.4.1)
102
+ diff-lcs (1.6.1)
103
+ docile (1.1.5)
104
+ drb (2.2.1)
105
+ erubi (1.13.1)
106
+ globalid (1.2.1)
107
+ activesupport (>= 6.1)
108
+ i18n (1.14.7)
109
+ concurrent-ruby (~> 1.0)
110
+ io-console (0.8.0)
111
+ irb (1.15.1)
112
+ pp (>= 0.6.0)
113
+ rdoc (>= 4.0.0)
114
+ reline (>= 0.4.2)
115
+ json (2.10.2)
116
+ language_server-protocol (3.17.0.4)
117
+ lhm (2.2.0)
118
+ lint_roller (1.1.0)
119
+ logger (1.7.0)
120
+ loofah (2.24.0)
121
+ crass (~> 1.0.2)
122
+ nokogiri (>= 1.12.0)
123
+ mail (2.8.1)
124
+ mini_mime (>= 0.1.1)
125
+ net-imap
126
+ net-pop
127
+ net-smtp
128
+ marcel (1.0.4)
129
+ method_source (1.1.0)
130
+ mini_mime (1.1.5)
131
+ minitest (5.25.5)
132
+ mutex_m (0.3.0)
133
+ mysql2 (0.5.6)
134
+ net-imap (0.5.6)
135
+ date
136
+ net-protocol
137
+ net-pop (0.1.2)
138
+ net-protocol
139
+ net-protocol (0.2.2)
140
+ timeout
141
+ net-smtp (0.5.1)
142
+ net-protocol
143
+ nio4r (2.7.4)
144
+ nokogiri (1.18.6-arm64-darwin)
145
+ racc (~> 1.4)
146
+ nokogiri (1.18.6-x86_64-linux-gnu)
147
+ racc (~> 1.4)
148
+ parallel (1.26.3)
149
+ parser (3.3.7.4)
150
+ ast (~> 2.4.1)
151
+ racc
152
+ pp (0.6.2)
153
+ prettyprint
154
+ prettyprint (0.2.0)
155
+ prism (1.4.0)
156
+ pry (0.15.2)
157
+ coderay (~> 1.1)
158
+ method_source (~> 1.0)
159
+ pry-byebug (3.11.0)
160
+ byebug (~> 12.0)
161
+ pry (>= 0.13, < 0.16)
162
+ psych (5.2.3)
163
+ date
164
+ stringio
165
+ racc (1.8.1)
166
+ rack (3.1.12)
167
+ rack-session (2.1.0)
168
+ base64 (>= 0.1.0)
169
+ rack (>= 3.0.0)
170
+ rack-test (2.2.0)
171
+ rack (>= 1.3)
172
+ rackup (2.2.1)
173
+ rack (>= 3)
174
+ rails (7.2.2.1)
175
+ actioncable (= 7.2.2.1)
176
+ actionmailbox (= 7.2.2.1)
177
+ actionmailer (= 7.2.2.1)
178
+ actionpack (= 7.2.2.1)
179
+ actiontext (= 7.2.2.1)
180
+ actionview (= 7.2.2.1)
181
+ activejob (= 7.2.2.1)
182
+ activemodel (= 7.2.2.1)
183
+ activerecord (= 7.2.2.1)
184
+ activestorage (= 7.2.2.1)
185
+ activesupport (= 7.2.2.1)
186
+ bundler (>= 1.15.0)
187
+ railties (= 7.2.2.1)
188
+ rails-dom-testing (2.2.0)
189
+ activesupport (>= 5.0.0)
190
+ minitest
191
+ nokogiri (>= 1.6)
192
+ rails-html-sanitizer (1.6.2)
193
+ loofah (~> 2.21)
194
+ nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
195
+ railties (7.2.2.1)
196
+ actionpack (= 7.2.2.1)
197
+ activesupport (= 7.2.2.1)
198
+ irb (~> 1.13)
199
+ rackup (>= 1.0.0)
200
+ rake (>= 12.2)
201
+ thor (~> 1.0, >= 1.2.2)
202
+ zeitwerk (~> 2.6)
203
+ rainbow (3.1.1)
204
+ rake (13.2.1)
205
+ rdoc (6.13.1)
206
+ psych (>= 4.0.0)
207
+ regexp_parser (2.10.0)
208
+ reline (0.6.0)
209
+ io-console (~> 0.5)
210
+ rspec (3.13.0)
211
+ rspec-core (~> 3.13.0)
212
+ rspec-expectations (~> 3.13.0)
213
+ rspec-mocks (~> 3.13.0)
214
+ rspec-core (3.13.3)
215
+ rspec-support (~> 3.13.0)
216
+ rspec-expectations (3.13.3)
217
+ diff-lcs (>= 1.2.0, < 2.0)
218
+ rspec-support (~> 3.13.0)
219
+ rspec-its (1.3.1)
220
+ rspec-core (>= 3.0.0)
221
+ rspec-expectations (>= 3.0.0)
222
+ rspec-mocks (3.13.2)
223
+ diff-lcs (>= 1.2.0, < 2.0)
224
+ rspec-support (~> 3.13.0)
225
+ rspec-support (3.13.2)
226
+ rubocop (1.74.0)
227
+ json (~> 2.3)
228
+ language_server-protocol (~> 3.17.0.2)
229
+ lint_roller (~> 1.1.0)
230
+ parallel (~> 1.10)
231
+ parser (>= 3.3.0.2)
232
+ rainbow (>= 2.2.2, < 4.0)
233
+ regexp_parser (>= 2.9.3, < 3.0)
234
+ rubocop-ast (>= 1.38.0, < 2.0)
235
+ ruby-progressbar (~> 1.7)
236
+ unicode-display_width (>= 2.4.0, < 4.0)
237
+ rubocop-ast (1.43.0)
238
+ parser (>= 3.3.7.2)
239
+ prism (~> 1.4)
240
+ rubocop-performance (1.20.2)
241
+ rubocop (>= 1.48.1, < 2.0)
242
+ rubocop-ast (>= 1.30.0, < 2.0)
243
+ ruby-progressbar (1.13.0)
244
+ securerandom (0.4.1)
245
+ simplecov (0.13.0)
246
+ docile (~> 1.1.0)
247
+ json (>= 1.8, < 3)
248
+ simplecov-html (~> 0.10.0)
249
+ simplecov-html (0.10.2)
250
+ stringio (3.1.6)
251
+ thor (1.3.2)
252
+ timeout (0.4.3)
253
+ tzinfo (2.0.6)
254
+ concurrent-ruby (~> 1.0)
255
+ unicode-display_width (3.1.4)
256
+ unicode-emoji (~> 4.0, >= 4.0.4)
257
+ unicode-emoji (4.0.4)
258
+ useragent (0.16.11)
259
+ websocket-driver (0.7.7)
260
+ base64
261
+ websocket-extensions (>= 0.1.0)
262
+ websocket-extensions (0.1.5)
263
+ zeitwerk (2.6.18)
264
+
265
+ PLATFORMS
266
+ arm64-darwin-24
267
+ x86_64-linux
268
+
269
+ DEPENDENCIES
270
+ appraisal (~> 2.4.1)
271
+ base64
272
+ climate_control (~> 0.0.3)
273
+ codeclimate-test-reporter (~> 1.0.3)
274
+ departure!
275
+ lhm
276
+ logger
277
+ mutex_m
278
+ pry-byebug
279
+ rails (= 7.2.2.1)
280
+ rake (>= 10.0)
281
+ rspec (~> 3.4, >= 3.4.0)
282
+ rspec-its (~> 1.2)
283
+ rubocop (~> 1.74.0)
284
+ rubocop-performance (~> 1.20.2)
285
+ zeitwerk (< 2.7.0)
286
+
287
+ BUNDLED WITH
288
+ 2.6.6
@@ -2,9 +2,13 @@
2
2
 
3
3
  source 'https://rubygems.org'
4
4
 
5
+ gem 'base64'
5
6
  gem 'codeclimate-test-reporter', '~> 1.0.3', group: :test, require: nil
6
- gem 'rails', '6.0.6.1'
7
- gem 'rubocop', '~> 1.60.2', require: false
7
+ gem 'lhm'
8
+ gem 'logger'
9
+ gem 'mutex_m', require: false
10
+ gem 'rails', '8.0.2.1'
11
+ gem 'rubocop', '~> 1.74.0', require: false
8
12
  gem 'rubocop-performance', '~> 1.20.2', require: false
9
13
 
10
14
  gemspec path: '../'
@@ -0,0 +1,285 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ departure (6.8.0)
5
+ activerecord (>= 7.0.1)
6
+ mysql2 (>= 0.4.0, < 0.6.0)
7
+ railties (>= 7.0.1)
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ actioncable (8.0.2.1)
13
+ actionpack (= 8.0.2.1)
14
+ activesupport (= 8.0.2.1)
15
+ nio4r (~> 2.0)
16
+ websocket-driver (>= 0.6.1)
17
+ zeitwerk (~> 2.6)
18
+ actionmailbox (8.0.2.1)
19
+ actionpack (= 8.0.2.1)
20
+ activejob (= 8.0.2.1)
21
+ activerecord (= 8.0.2.1)
22
+ activestorage (= 8.0.2.1)
23
+ activesupport (= 8.0.2.1)
24
+ mail (>= 2.8.0)
25
+ actionmailer (8.0.2.1)
26
+ actionpack (= 8.0.2.1)
27
+ actionview (= 8.0.2.1)
28
+ activejob (= 8.0.2.1)
29
+ activesupport (= 8.0.2.1)
30
+ mail (>= 2.8.0)
31
+ rails-dom-testing (~> 2.2)
32
+ actionpack (8.0.2.1)
33
+ actionview (= 8.0.2.1)
34
+ activesupport (= 8.0.2.1)
35
+ nokogiri (>= 1.8.5)
36
+ rack (>= 2.2.4)
37
+ rack-session (>= 1.0.1)
38
+ rack-test (>= 0.6.3)
39
+ rails-dom-testing (~> 2.2)
40
+ rails-html-sanitizer (~> 1.6)
41
+ useragent (~> 0.16)
42
+ actiontext (8.0.2.1)
43
+ actionpack (= 8.0.2.1)
44
+ activerecord (= 8.0.2.1)
45
+ activestorage (= 8.0.2.1)
46
+ activesupport (= 8.0.2.1)
47
+ globalid (>= 0.6.0)
48
+ nokogiri (>= 1.8.5)
49
+ actionview (8.0.2.1)
50
+ activesupport (= 8.0.2.1)
51
+ builder (~> 3.1)
52
+ erubi (~> 1.11)
53
+ rails-dom-testing (~> 2.2)
54
+ rails-html-sanitizer (~> 1.6)
55
+ activejob (8.0.2.1)
56
+ activesupport (= 8.0.2.1)
57
+ globalid (>= 0.3.6)
58
+ activemodel (8.0.2.1)
59
+ activesupport (= 8.0.2.1)
60
+ activerecord (8.0.2.1)
61
+ activemodel (= 8.0.2.1)
62
+ activesupport (= 8.0.2.1)
63
+ timeout (>= 0.4.0)
64
+ activestorage (8.0.2.1)
65
+ actionpack (= 8.0.2.1)
66
+ activejob (= 8.0.2.1)
67
+ activerecord (= 8.0.2.1)
68
+ activesupport (= 8.0.2.1)
69
+ marcel (~> 1.0)
70
+ activesupport (8.0.2.1)
71
+ base64
72
+ benchmark (>= 0.3)
73
+ bigdecimal
74
+ concurrent-ruby (~> 1.0, >= 1.3.1)
75
+ connection_pool (>= 2.2.5)
76
+ drb
77
+ i18n (>= 1.6, < 2)
78
+ logger (>= 1.4.2)
79
+ minitest (>= 5.1)
80
+ securerandom (>= 0.3)
81
+ tzinfo (~> 2.0, >= 2.0.5)
82
+ uri (>= 0.13.1)
83
+ appraisal (2.4.1)
84
+ bundler
85
+ rake
86
+ thor (>= 0.14.0)
87
+ ast (2.4.3)
88
+ base64 (0.2.0)
89
+ benchmark (0.4.0)
90
+ bigdecimal (3.1.9)
91
+ builder (3.3.0)
92
+ byebug (12.0.0)
93
+ climate_control (0.0.4)
94
+ activesupport (>= 3.0)
95
+ codeclimate-test-reporter (1.0.9)
96
+ simplecov (<= 0.13)
97
+ coderay (1.1.3)
98
+ concurrent-ruby (1.3.5)
99
+ connection_pool (2.5.0)
100
+ crass (1.0.6)
101
+ date (3.4.1)
102
+ diff-lcs (1.6.1)
103
+ docile (1.1.5)
104
+ drb (2.2.1)
105
+ erubi (1.13.1)
106
+ globalid (1.2.1)
107
+ activesupport (>= 6.1)
108
+ i18n (1.14.7)
109
+ concurrent-ruby (~> 1.0)
110
+ io-console (0.8.0)
111
+ irb (1.15.2)
112
+ pp (>= 0.6.0)
113
+ rdoc (>= 4.0.0)
114
+ reline (>= 0.4.2)
115
+ json (2.10.2)
116
+ language_server-protocol (3.17.0.4)
117
+ lhm (2.2.0)
118
+ lint_roller (1.1.0)
119
+ logger (1.7.0)
120
+ loofah (2.24.0)
121
+ crass (~> 1.0.2)
122
+ nokogiri (>= 1.12.0)
123
+ mail (2.8.1)
124
+ mini_mime (>= 0.1.1)
125
+ net-imap
126
+ net-pop
127
+ net-smtp
128
+ marcel (1.0.4)
129
+ method_source (1.1.0)
130
+ mini_mime (1.1.5)
131
+ minitest (5.25.5)
132
+ mutex_m (0.3.0)
133
+ mysql2 (0.5.6)
134
+ net-imap (0.5.6)
135
+ date
136
+ net-protocol
137
+ net-pop (0.1.2)
138
+ net-protocol
139
+ net-protocol (0.2.2)
140
+ timeout
141
+ net-smtp (0.5.1)
142
+ net-protocol
143
+ nio4r (2.7.4)
144
+ nokogiri (1.18.7-x86_64-linux-gnu)
145
+ racc (~> 1.4)
146
+ parallel (1.26.3)
147
+ parser (3.3.7.4)
148
+ ast (~> 2.4.1)
149
+ racc
150
+ pp (0.6.2)
151
+ prettyprint
152
+ prettyprint (0.2.0)
153
+ prism (1.4.0)
154
+ pry (0.15.2)
155
+ coderay (~> 1.1)
156
+ method_source (~> 1.0)
157
+ pry-byebug (3.11.0)
158
+ byebug (~> 12.0)
159
+ pry (>= 0.13, < 0.16)
160
+ psych (5.2.3)
161
+ date
162
+ stringio
163
+ racc (1.8.1)
164
+ rack (3.1.12)
165
+ rack-session (2.1.0)
166
+ base64 (>= 0.1.0)
167
+ rack (>= 3.0.0)
168
+ rack-test (2.2.0)
169
+ rack (>= 1.3)
170
+ rackup (2.2.1)
171
+ rack (>= 3)
172
+ rails (8.0.2.1)
173
+ actioncable (= 8.0.2.1)
174
+ actionmailbox (= 8.0.2.1)
175
+ actionmailer (= 8.0.2.1)
176
+ actionpack (= 8.0.2.1)
177
+ actiontext (= 8.0.2.1)
178
+ actionview (= 8.0.2.1)
179
+ activejob (= 8.0.2.1)
180
+ activemodel (= 8.0.2.1)
181
+ activerecord (= 8.0.2.1)
182
+ activestorage (= 8.0.2.1)
183
+ activesupport (= 8.0.2.1)
184
+ bundler (>= 1.15.0)
185
+ railties (= 8.0.2.1)
186
+ rails-dom-testing (2.2.0)
187
+ activesupport (>= 5.0.0)
188
+ minitest
189
+ nokogiri (>= 1.6)
190
+ rails-html-sanitizer (1.6.2)
191
+ loofah (~> 2.21)
192
+ nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
193
+ railties (8.0.2.1)
194
+ actionpack (= 8.0.2.1)
195
+ activesupport (= 8.0.2.1)
196
+ irb (~> 1.13)
197
+ rackup (>= 1.0.0)
198
+ rake (>= 12.2)
199
+ thor (~> 1.0, >= 1.2.2)
200
+ zeitwerk (~> 2.6)
201
+ rainbow (3.1.1)
202
+ rake (13.2.1)
203
+ rdoc (6.13.1)
204
+ psych (>= 4.0.0)
205
+ regexp_parser (2.10.0)
206
+ reline (0.6.0)
207
+ io-console (~> 0.5)
208
+ rspec (3.13.0)
209
+ rspec-core (~> 3.13.0)
210
+ rspec-expectations (~> 3.13.0)
211
+ rspec-mocks (~> 3.13.0)
212
+ rspec-core (3.13.3)
213
+ rspec-support (~> 3.13.0)
214
+ rspec-expectations (3.13.3)
215
+ diff-lcs (>= 1.2.0, < 2.0)
216
+ rspec-support (~> 3.13.0)
217
+ rspec-its (1.3.1)
218
+ rspec-core (>= 3.0.0)
219
+ rspec-expectations (>= 3.0.0)
220
+ rspec-mocks (3.13.2)
221
+ diff-lcs (>= 1.2.0, < 2.0)
222
+ rspec-support (~> 3.13.0)
223
+ rspec-support (3.13.2)
224
+ rubocop (1.74.0)
225
+ json (~> 2.3)
226
+ language_server-protocol (~> 3.17.0.2)
227
+ lint_roller (~> 1.1.0)
228
+ parallel (~> 1.10)
229
+ parser (>= 3.3.0.2)
230
+ rainbow (>= 2.2.2, < 4.0)
231
+ regexp_parser (>= 2.9.3, < 3.0)
232
+ rubocop-ast (>= 1.38.0, < 2.0)
233
+ ruby-progressbar (~> 1.7)
234
+ unicode-display_width (>= 2.4.0, < 4.0)
235
+ rubocop-ast (1.44.0)
236
+ parser (>= 3.3.7.2)
237
+ prism (~> 1.4)
238
+ rubocop-performance (1.20.2)
239
+ rubocop (>= 1.48.1, < 2.0)
240
+ rubocop-ast (>= 1.30.0, < 2.0)
241
+ ruby-progressbar (1.13.0)
242
+ securerandom (0.4.1)
243
+ simplecov (0.13.0)
244
+ docile (~> 1.1.0)
245
+ json (>= 1.8, < 3)
246
+ simplecov-html (~> 0.10.0)
247
+ simplecov-html (0.10.2)
248
+ stringio (3.1.6)
249
+ thor (1.3.2)
250
+ timeout (0.4.3)
251
+ tzinfo (2.0.6)
252
+ concurrent-ruby (~> 1.0)
253
+ unicode-display_width (3.1.4)
254
+ unicode-emoji (~> 4.0, >= 4.0.4)
255
+ unicode-emoji (4.0.4)
256
+ uri (1.0.3)
257
+ useragent (0.16.11)
258
+ websocket-driver (0.7.7)
259
+ base64
260
+ websocket-extensions (>= 0.1.0)
261
+ websocket-extensions (0.1.5)
262
+ zeitwerk (2.7.2)
263
+
264
+ PLATFORMS
265
+ x86_64-linux
266
+
267
+ DEPENDENCIES
268
+ appraisal (~> 2.4.1)
269
+ base64
270
+ climate_control (~> 0.0.3)
271
+ codeclimate-test-reporter (~> 1.0.3)
272
+ departure!
273
+ lhm
274
+ logger
275
+ mutex_m
276
+ pry-byebug
277
+ rails (= 8.0.2.1)
278
+ rake (>= 10.0)
279
+ rspec (~> 3.4, >= 3.4.0)
280
+ rspec-its (~> 1.2)
281
+ rubocop (~> 1.74.0)
282
+ rubocop-performance (~> 1.20.2)
283
+
284
+ BUNDLED WITH
285
+ 2.6.6
@@ -52,27 +52,14 @@ module ForAlterStatements
52
52
  end
53
53
 
54
54
  def add_index_for_alter(table_name, column_name, options = {})
55
- if ActiveRecord::VERSION::STRING >= '6.1'
56
- index_definition, = add_index_options(table_name, column_name, **options)
55
+ index_definition, = add_index_options(table_name, column_name, **options)
57
56
 
58
- "ADD #{schema_creation.accept(index_definition)}"
59
- else
60
- index_name, index_type, index_columns, _,
61
- index_algorithm, index_using = add_index_options(table_name, column_name, **options)
62
- index_algorithm[0, 0] = ', ' if index_algorithm.present?
63
-
64
- "ADD #{index_type} INDEX #{quote_column_name(index_name)} #{index_using} (#{index_columns})#{index_algorithm}"
65
- end
57
+ "ADD #{schema_creation.accept(index_definition)}"
66
58
  end
67
59
 
68
60
  def remove_index_for_alter(table_name, column_name = nil, **options)
69
- index_name =
70
- if ActiveRecord::VERSION::STRING >= '6.1'
71
- index_name_for_remove(table_name, column_name, options)
72
- else
73
- options = [column_name, options] if column_name
74
- index_name_for_remove(table_name, options)
75
- end
61
+ index_name = index_name_for_remove(table_name, column_name, options)
62
+
76
63
  "DROP INDEX #{quote_column_name(index_name)}"
77
64
  end
78
65
 
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'active_record/connection_handling'
4
+
5
+ module ActiveRecord
6
+ module ConnectionHandling
7
+ # Establishes a connection to the database that's used by all Active
8
+ # Record objects.
9
+ def percona_connection(config)
10
+ if config[:username].nil?
11
+ config = config.dup if config.frozen?
12
+ config[:username] = 'root'
13
+ end
14
+
15
+ Departure::RailsAdapter.for_current.create_connection_adapter(**config)
16
+ end
17
+ end
18
+ end