ridgepole 0.8.11 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (138) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test.yml +23 -2
  3. data/.simplecov +6 -0
  4. data/Appraisals +4 -5
  5. data/README.md +22 -41
  6. data/bin/ridgepole +13 -3
  7. data/gemfiles/{activerecord_5.0.gemfile → activerecord_6.1.gemfile} +1 -2
  8. data/lib/ridgepole/client.rb +8 -3
  9. data/lib/ridgepole/default_limit.rb +1 -1
  10. data/lib/ridgepole/delta.rb +16 -1
  11. data/lib/ridgepole/diff.rb +50 -31
  12. data/lib/ridgepole/dsl_parser/table_definition.rb +46 -43
  13. data/lib/ridgepole/execute_expander.rb +10 -1
  14. data/lib/ridgepole/ext/abstract_adapter/disable_table_options.rb +9 -1
  15. data/lib/ridgepole/external_sql_executer.rb +12 -1
  16. data/lib/ridgepole/version.rb +1 -1
  17. data/ridgepole.gemspec +6 -3
  18. data/spec/erb_helper.rb +1 -1
  19. data/spec/mysql/_migrate/migrate_change_table_option_spec.rb +2 -2
  20. data/spec/mysql/bigint_pk/int_pk_spec.rb +1 -1
  21. data/spec/mysql/cli/ridgepole_spec.rb +35 -1
  22. data/spec/mysql/collation/collation_spec.rb +14 -14
  23. data/spec/mysql/comment/comment_spec.rb +9 -9
  24. data/spec/mysql/diff/diff2_spec.rb +5 -5
  25. data/spec/mysql/diff/diff_spec.rb +3 -3
  26. data/spec/mysql/dump/dump_class_method_spec.rb +13 -13
  27. data/spec/mysql/dump/dump_some_tables_spec.rb +4 -4
  28. data/spec/mysql/dump/dump_spec.rb +13 -13
  29. data/spec/mysql/dump/dump_unknown_column_type_spec.rb +2 -2
  30. data/spec/mysql/dump/dump_without_table_options_spec.rb +2 -2
  31. data/spec/mysql/fk/migrate_change_fk2_spec.rb +2 -2
  32. data/spec/mysql/fk/migrate_change_fk_spec.rb +20 -20
  33. data/spec/mysql/fk/migrate_create_fk_spec.rb +22 -22
  34. data/spec/mysql/fk/migrate_drop_fk_spec.rb +26 -26
  35. data/spec/mysql/fk/migrate_fk_with_column_spec.rb +16 -16
  36. data/spec/mysql/fk/migrate_ignore_fk_spec.rb +6 -6
  37. data/spec/mysql/migrate/migrate_add_column_order_spec.rb +2 -2
  38. data/spec/mysql/migrate/migrate_add_column_spec.rb +18 -18
  39. data/spec/mysql/migrate/migrate_add_column_with_alter_extra_spec.rb +106 -18
  40. data/spec/mysql/migrate/migrate_add_column_with_script_spec.rb +18 -18
  41. data/spec/mysql/migrate/migrate_change_column2_spec.rb +5 -5
  42. data/spec/mysql/migrate/migrate_change_column3_spec.rb +24 -55
  43. data/spec/mysql/migrate/migrate_change_column5_spec.rb +3 -3
  44. data/spec/mysql/migrate/migrate_change_column6_spec.rb +7 -7
  45. data/spec/mysql/migrate/migrate_change_column8_spec.rb +38 -5
  46. data/spec/mysql/migrate/migrate_change_column_default_spec.rb +2 -14
  47. data/spec/mysql/migrate/migrate_change_column_spec.rb +21 -21
  48. data/spec/mysql/migrate/migrate_change_index2_spec.rb +5 -5
  49. data/spec/mysql/migrate/migrate_change_index3_spec.rb +7 -7
  50. data/spec/mysql/migrate/migrate_change_index4_spec.rb +6 -6
  51. data/spec/mysql/migrate/migrate_change_index5_spec.rb +4 -4
  52. data/spec/mysql/migrate/migrate_change_index6_spec.rb +27 -27
  53. data/spec/mysql/migrate/migrate_change_index7_spec.rb +4 -4
  54. data/spec/mysql/migrate/migrate_change_index8_spec.rb +4 -4
  55. data/spec/mysql/migrate/migrate_change_index_spec.rb +34 -28
  56. data/spec/mysql/migrate/migrate_check_relation_column_type_spec.rb +5 -5
  57. data/spec/mysql/migrate/migrate_create_index2_spec.rb +24 -24
  58. data/spec/mysql/migrate/migrate_create_index_spec.rb +18 -18
  59. data/spec/mysql/migrate/migrate_create_table_spec.rb +16 -16
  60. data/spec/mysql/migrate/migrate_create_table_with_ignore_spec.rb +4 -4
  61. data/spec/mysql/migrate/migrate_create_table_with_index_spec.rb +4 -4
  62. data/spec/mysql/migrate/migrate_create_table_with_script_spec.rb +16 -16
  63. data/spec/mysql/migrate/migrate_drop_column_and_index2_spec.rb +18 -18
  64. data/spec/mysql/migrate/migrate_drop_column_and_index_spec.rb +16 -16
  65. data/spec/mysql/migrate/migrate_drop_column_and_unique_index_spec.rb +1 -1
  66. data/spec/mysql/migrate/migrate_drop_column_spec.rb +18 -18
  67. data/spec/mysql/migrate/migrate_drop_index_spec.rb +15 -15
  68. data/spec/mysql/migrate/migrate_drop_table_spec.rb +16 -16
  69. data/spec/mysql/migrate/migrate_empty_spec.rb +9 -9
  70. data/spec/mysql/migrate/migrate_execute_spec.rb +32 -32
  71. data/spec/mysql/migrate/migrate_ignore_column_spec.rb +4 -4
  72. data/spec/mysql/migrate/migrate_ignore_index_spec.rb +5 -5
  73. data/spec/mysql/migrate/migrate_log_file_spec.rb +16 -16
  74. data/spec/mysql/migrate/migrate_merge_mode_spec.rb +18 -18
  75. data/spec/mysql/migrate/migrate_noop_spec.rb +12 -12
  76. data/spec/mysql/migrate/migrate_primary_key_spec.rb +31 -6
  77. data/spec/mysql/migrate/migrate_rename_column_spec.rb +18 -18
  78. data/spec/mysql/migrate/migrate_rename_table_spec.rb +22 -22
  79. data/spec/mysql/migrate/migrate_same_spec.rb +13 -13
  80. data/spec/mysql/migrate/migrate_skip_column_comment_change_spec.rb +2 -2
  81. data/spec/mysql/migrate/migrate_skip_drop_table_spec.rb +18 -18
  82. data/spec/mysql/migrate/migrate_skip_rename_column_spec.rb +18 -18
  83. data/spec/mysql/migrate/migrate_skip_rename_table_spec.rb +18 -18
  84. data/spec/mysql/migrate/migrate_with_pre_post_query_spec.rb +18 -18
  85. data/spec/mysql/text_blob_types/text_blob_types_spec.rb +2 -2
  86. data/spec/mysql/~default_name_fk/migrate_change_fk_spec.rb +6 -6
  87. data/spec/mysql/~default_name_fk/migrate_create_fk_spec.rb +9 -9
  88. data/spec/mysql/~default_name_fk/migrate_drop_fk_spec.rb +8 -8
  89. data/spec/mysql/~dump_auto_increment/migrate_create_table_with_index_spec.rb +5 -5
  90. data/spec/mysql57/json/add_json_column_spec.rb +2 -2
  91. data/spec/mysql57/json/change_json_column_spec.rb +6 -6
  92. data/spec/mysql57/json/drop_json_column_spec.rb +2 -2
  93. data/spec/mysql57/virtual/add_virtual_column_spec.rb +1 -1
  94. data/spec/mysql57/virtual/change_virtual_column_spec.rb +1 -1
  95. data/spec/mysql57/virtual/drop_virtual_column_spec.rb +1 -1
  96. data/spec/postgresql/dump/dump_spec.rb +13 -13
  97. data/spec/postgresql/fk/migrate_change_fk_spec.rb +6 -6
  98. data/spec/postgresql/fk/migrate_create_fk_spec.rb +5 -5
  99. data/spec/postgresql/fk/migrate_drop_fk_spec.rb +8 -8
  100. data/spec/postgresql/migrate/migrate_add_column_spec.rb +27 -20
  101. data/spec/postgresql/migrate/migrate_add_expression_index_spec.rb +1 -1
  102. data/spec/postgresql/migrate/migrate_change_column_spec.rb +20 -16
  103. data/spec/postgresql/migrate/migrate_change_index_spec.rb +18 -18
  104. data/spec/postgresql/migrate/migrate_check_relation_column_type_spec.rb +1 -1
  105. data/spec/postgresql/migrate/migrate_create_table_spec.rb +14 -14
  106. data/spec/postgresql/migrate/migrate_drop_column_spec.rb +29 -22
  107. data/spec/postgresql/migrate/migrate_drop_column_with_index_spec.rb +17 -17
  108. data/spec/postgresql/migrate/migrate_drop_expression_index_spec.rb +3 -3
  109. data/spec/postgresql/migrate/migrate_drop_index_spec.rb +15 -15
  110. data/spec/postgresql/migrate/migrate_drop_table_spec.rb +16 -16
  111. data/spec/postgresql/migrate/migrate_primary_key2_spec.rb +1 -1
  112. data/spec/postgresql/migrate/migrate_primary_key_spec.rb +1 -1
  113. data/spec/postgresql/migrate/migrate_references_spec.rb +6 -6
  114. data/spec/postgresql/migrate/migrate_rename_column_spec.rb +18 -18
  115. data/spec/postgresql/migrate/migrate_rename_table_spec.rb +20 -20
  116. data/spec/postgresql/migrate/migrate_same_spec.rb +13 -13
  117. data/spec/postgresql/~default_name_fk/migrate_change_fk_spec.rb +3 -3
  118. data/spec/postgresql/~default_name_fk/migrate_create_fk_spec.rb +4 -4
  119. data/spec/postgresql/~default_name_fk/migrate_drop_fk_spec.rb +4 -4
  120. data/spec/processing_for_ci.rb +13 -0
  121. data/spec/spec_helper.rb +1 -1
  122. metadata +69 -44
  123. data/lib/ridgepole/ext/abstract_mysql_adapter/use_alter_index.rb +0 -31
  124. data/omnibus-ridgepole/.gitignore +0 -10
  125. data/omnibus-ridgepole/Dockerfile.centos +0 -25
  126. data/omnibus-ridgepole/Dockerfile.ubuntu +0 -21
  127. data/omnibus-ridgepole/Gemfile +0 -24
  128. data/omnibus-ridgepole/README.md +0 -15
  129. data/omnibus-ridgepole/Rakefile +0 -38
  130. data/omnibus-ridgepole/config/projects/ridgepole.rb +0 -27
  131. data/omnibus-ridgepole/config/software/ridgepole.rb +0 -13
  132. data/omnibus-ridgepole/omnibus.rb +0 -54
  133. data/omnibus-ridgepole/package-scripts/ridgepole/postinst +0 -1
  134. data/omnibus-ridgepole/package-scripts/ridgepole/postrm +0 -1
  135. data/spec/mysql/bigint_pk/bigint_pk_spec.rb +0 -47
  136. data/spec/mysql/migrate_/migrate_create_index_with_alter_spec.rb +0 -141
  137. data/spec/mysql/migrate_/migrate_drop_index_with_alter_spec.rb +0 -141
  138. data/spec/processing_for_travis.rb +0 -11
@@ -9,7 +9,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
9
9
 
10
10
  create_table "child", force: :cascade do |t|
11
11
  t.integer "parent_id"
12
- t.index ["parent_id"], name: "par_id", <%= i cond(5.0, using: :btree) %>
12
+ t.index ["parent_id"], name: "par_id"
13
13
  end
14
14
 
15
15
  add_foreign_key "child", "parent", name: "fk_rails_e74ce85cbc", on_delete: :cascade
@@ -20,7 +20,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
20
20
  erbh(<<-ERB)
21
21
  create_table "child", force: :cascade do |t|
22
22
  t.integer "parent_id"
23
- t.index ["parent_id"], name: "par_id", <%= i cond(5.0, using: :btree) %>
23
+ t.index ["parent_id"], name: "par_id"
24
24
  end
25
25
 
26
26
  create_table "parent", force: :cascade do |t|
@@ -34,7 +34,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
34
34
  erbh(<<-ERB)
35
35
  create_table "child", force: :cascade do |t|
36
36
  t.integer "parent_id"
37
- t.index ["parent_id"], name: "par_id", <%= i cond(5.0, using: :btree) %>
37
+ t.index ["parent_id"], name: "par_id"
38
38
  end
39
39
 
40
40
  create_table "parent", force: :cascade do |t|
@@ -6,7 +6,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
6
6
  erbh(<<-ERB)
7
7
  create_table "child", force: :cascade do |t|
8
8
  t.integer "parent_id"
9
- t.index ["parent_id"], name: "par_id", <%= i cond(5.0, using: :btree) %>
9
+ t.index ["parent_id"], name: "par_id"
10
10
  end
11
11
 
12
12
  create_table "parent", force: :cascade do |t|
@@ -52,7 +52,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
52
52
 
53
53
  create_table "child", force: :cascade do |t|
54
54
  t.integer "parent_id", unsigned: true
55
- t.index ["parent_id"], name: "par_id", <%= i cond(5.0, using: :btree) %>
55
+ t.index ["parent_id"], name: "par_id"
56
56
  end
57
57
 
58
58
  add_foreign_key "child", "parent", name: "fk_rails_e74ce85cbc"
@@ -63,7 +63,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
63
63
  erbh(<<-ERB)
64
64
  create_table "child", force: :cascade do |t|
65
65
  t.integer "parent_id"
66
- t.index ["parent_id"], name: "par_id", <%= i cond(5.0, using: :btree) %>
66
+ t.index ["parent_id"], name: "par_id"
67
67
  end
68
68
 
69
69
  create_table "parent", force: :cascade do |t|
@@ -94,7 +94,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
94
94
 
95
95
  create_table "child", force: :cascade do |t|
96
96
  t.integer "parent_id", unsigned: true
97
- t.index ["parent_id"], name: "par_id", <%= i cond(5.0, using: :btree) %>
97
+ t.index ["parent_id"], name: "par_id"
98
98
  end
99
99
 
100
100
  add_foreign_key "child", "parent", name: "fk_rails_e74ce85cbc"
@@ -9,7 +9,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
9
9
 
10
10
  create_table "child", force: :cascade do |t|
11
11
  t.integer "parent_id"
12
- t.index ["parent_id"], name: "par_id", <%= i cond(5.0, using: :btree) %>
12
+ t.index ["parent_id"], name: "par_id"
13
13
  end
14
14
 
15
15
  add_foreign_key "child", "parent", name: "fk_rails_e74ce85cbc"
@@ -26,7 +26,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
26
26
  erbh(<<-ERB)
27
27
  create_table "child", force: :cascade do |t|
28
28
  t.integer "parent_id"
29
- t.index ["parent_id"], name: "par_id", <%= i cond(5.0, using: :btree) %>
29
+ t.index ["parent_id"], name: "par_id"
30
30
  end
31
31
 
32
32
  create_table "parent", force: :cascade do |t|
@@ -65,7 +65,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
65
65
 
66
66
  create_table "child", force: :cascade do |t|
67
67
  t.integer "parent_id", unsigned: true
68
- t.index ["parent_id"], name: "par_id", <%= i cond(5.0, using: :btree) %>
68
+ t.index ["parent_id"], name: "par_id"
69
69
  end
70
70
 
71
71
  add_foreign_key "child", "parent", name: "fk_rails_e74ce85cbc"
@@ -76,7 +76,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
76
76
  erbh(<<-ERB)
77
77
  create_table "child", force: :cascade do |t|
78
78
  t.integer "parent_id"
79
- t.index ["parent_id"], name: "par_id", <%= i cond(5.0, using: :btree) %>
79
+ t.index ["parent_id"], name: "par_id"
80
80
  end
81
81
 
82
82
  create_table "parent", force: :cascade do |t|
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ if ENV['CI']
4
+ require 'simplecov'
5
+ require 'simplecov-lcov'
6
+
7
+ SimpleCov::Formatter::LcovFormatter.config do |c|
8
+ c.report_with_single_file = true
9
+ c.single_report_path = 'coverage/lcov.info'
10
+ end
11
+ SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new([SimpleCov::Formatter::LcovFormatter])
12
+ SimpleCov.start
13
+ end
@@ -7,7 +7,7 @@ require 'spec_condition'
7
7
  require 'cli_helper'
8
8
  require 'hide_pending_formatter'
9
9
 
10
- require 'processing_for_travis'
10
+ require 'processing_for_ci'
11
11
 
12
12
  require 'ridgepole'
13
13
  require 'ridgepole/cli/config'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ridgepole
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.11
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-30 00:00:00.000000000 Z
11
+ date: 2021-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -16,20 +16,20 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 5.0.1
19
+ version: '5.1'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '6.1'
22
+ version: '6.2'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 5.0.1
29
+ version: '5.1'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '6.1'
32
+ version: '6.2'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: diffy
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -72,20 +72,6 @@ dependencies:
72
72
  - - ">="
73
73
  - !ruby/object:Gem::Version
74
74
  version: '0'
75
- - !ruby/object:Gem::Dependency
76
- name: coveralls
77
- requirement: !ruby/object:Gem::Requirement
78
- requirements:
79
- - - ">="
80
- - !ruby/object:Gem::Version
81
- version: '0'
82
- type: :development
83
- prerelease: false
84
- version_requirements: !ruby/object:Gem::Requirement
85
- requirements:
86
- - - ">="
87
- - !ruby/object:Gem::Version
88
- version: '0'
89
75
  - !ruby/object:Gem::Dependency
90
76
  name: erbh
91
77
  requirement: !ruby/object:Gem::Requirement
@@ -214,18 +200,74 @@ dependencies:
214
200
  version: 0.1.3
215
201
  - !ruby/object:Gem::Dependency
216
202
  name: rubocop
203
+ requirement: !ruby/object:Gem::Requirement
204
+ requirements:
205
+ - - '='
206
+ - !ruby/object:Gem::Version
207
+ version: 1.8.1
208
+ type: :development
209
+ prerelease: false
210
+ version_requirements: !ruby/object:Gem::Requirement
211
+ requirements:
212
+ - - '='
213
+ - !ruby/object:Gem::Version
214
+ version: 1.8.1
215
+ - !ruby/object:Gem::Dependency
216
+ name: rubocop-rake
217
217
  requirement: !ruby/object:Gem::Requirement
218
218
  requirements:
219
219
  - - ">="
220
220
  - !ruby/object:Gem::Version
221
- version: 0.57.1
221
+ version: 0.5.1
222
222
  type: :development
223
223
  prerelease: false
224
224
  version_requirements: !ruby/object:Gem::Requirement
225
225
  requirements:
226
226
  - - ">="
227
227
  - !ruby/object:Gem::Version
228
- version: 0.57.1
228
+ version: 0.5.1
229
+ - !ruby/object:Gem::Dependency
230
+ name: rubocop-rspec
231
+ requirement: !ruby/object:Gem::Requirement
232
+ requirements:
233
+ - - ">="
234
+ - !ruby/object:Gem::Version
235
+ version: 2.1.0
236
+ type: :development
237
+ prerelease: false
238
+ version_requirements: !ruby/object:Gem::Requirement
239
+ requirements:
240
+ - - ">="
241
+ - !ruby/object:Gem::Version
242
+ version: 2.1.0
243
+ - !ruby/object:Gem::Dependency
244
+ name: simplecov
245
+ requirement: !ruby/object:Gem::Requirement
246
+ requirements:
247
+ - - ">="
248
+ - !ruby/object:Gem::Version
249
+ version: '0'
250
+ type: :development
251
+ prerelease: false
252
+ version_requirements: !ruby/object:Gem::Requirement
253
+ requirements:
254
+ - - ">="
255
+ - !ruby/object:Gem::Version
256
+ version: '0'
257
+ - !ruby/object:Gem::Dependency
258
+ name: simplecov-lcov
259
+ requirement: !ruby/object:Gem::Requirement
260
+ requirements:
261
+ - - ">="
262
+ - !ruby/object:Gem::Version
263
+ version: '0'
264
+ type: :development
265
+ prerelease: false
266
+ version_requirements: !ruby/object:Gem::Requirement
267
+ requirements:
268
+ - - ">="
269
+ - !ruby/object:Gem::Version
270
+ version: '0'
229
271
  description: Ridgepole is a tool to manage DB schema. It defines DB schema using Rails
230
272
  DSL, and updates DB schema according to DSL.
231
273
  email:
@@ -239,6 +281,7 @@ files:
239
281
  - ".gitignore"
240
282
  - ".rspec"
241
283
  - ".rubocop.yml"
284
+ - ".simplecov"
242
285
  - Appraisals
243
286
  - Gemfile
244
287
  - LICENSE.txt
@@ -246,10 +289,10 @@ files:
246
289
  - Rakefile
247
290
  - bin/ridgepole
248
291
  - docker-compose.yml
249
- - gemfiles/activerecord_5.0.gemfile
250
292
  - gemfiles/activerecord_5.1.gemfile
251
293
  - gemfiles/activerecord_5.2.gemfile
252
294
  - gemfiles/activerecord_6.0.gemfile
295
+ - gemfiles/activerecord_6.1.gemfile
253
296
  - lib/ridgepole.rb
254
297
  - lib/ridgepole/cli/config.rb
255
298
  - lib/ridgepole/client.rb
@@ -264,7 +307,6 @@ files:
264
307
  - lib/ridgepole/execute_expander.rb
265
308
  - lib/ridgepole/ext/abstract_adapter/disable_table_options.rb
266
309
  - lib/ridgepole/ext/abstract_mysql_adapter/dump_auto_increment.rb
267
- - lib/ridgepole/ext/abstract_mysql_adapter/use_alter_index.rb
268
310
  - lib/ridgepole/ext/pp_sort_hash.rb
269
311
  - lib/ridgepole/ext/schema_dumper.rb
270
312
  - lib/ridgepole/external_sql_executer.rb
@@ -273,17 +315,6 @@ files:
273
315
  - lib/ridgepole/schema_dumper_ext.rb
274
316
  - lib/ridgepole/schema_statements_ext.rb
275
317
  - lib/ridgepole/version.rb
276
- - omnibus-ridgepole/.gitignore
277
- - omnibus-ridgepole/Dockerfile.centos
278
- - omnibus-ridgepole/Dockerfile.ubuntu
279
- - omnibus-ridgepole/Gemfile
280
- - omnibus-ridgepole/README.md
281
- - omnibus-ridgepole/Rakefile
282
- - omnibus-ridgepole/config/projects/ridgepole.rb
283
- - omnibus-ridgepole/config/software/ridgepole.rb
284
- - omnibus-ridgepole/omnibus.rb
285
- - omnibus-ridgepole/package-scripts/ridgepole/postinst
286
- - omnibus-ridgepole/package-scripts/ridgepole/postrm
287
318
  - ridgepole.gemspec
288
319
  - spec/cli_helper.rb
289
320
  - spec/dsl_parser/context_spec.rb
@@ -291,7 +322,6 @@ files:
291
322
  - spec/fixtures/for_require_relative_spec.rb
292
323
  - spec/hide_pending_formatter.rb
293
324
  - spec/mysql/_migrate/migrate_change_table_option_spec.rb
294
- - spec/mysql/bigint_pk/bigint_pk_spec.rb
295
325
  - spec/mysql/bigint_pk/int_pk_spec.rb
296
326
  - spec/mysql/cli/config_spec.rb
297
327
  - spec/mysql/cli/ridgepole_spec.rb
@@ -374,8 +404,6 @@ files:
374
404
  - spec/mysql/migrate/migrate_with_pre_post_query_spec.rb
375
405
  - spec/mysql/migrate/migrate_with_tables_spec.rb
376
406
  - spec/mysql/migrate/migrate_with_verbose_log_spec.rb
377
- - spec/mysql/migrate_/migrate_create_index_with_alter_spec.rb
378
- - spec/mysql/migrate_/migrate_drop_index_with_alter_spec.rb
379
407
  - spec/mysql/ridgepole_test_database.sql
380
408
  - spec/mysql/ridgepole_test_tables.sql
381
409
  - spec/mysql/ridgepole_test_tables_unknown_column_type.sql
@@ -421,7 +449,7 @@ files:
421
449
  - spec/postgresql/~default_name_fk/migrate_change_fk_spec.rb
422
450
  - spec/postgresql/~default_name_fk/migrate_create_fk_spec.rb
423
451
  - spec/postgresql/~default_name_fk/migrate_drop_fk_spec.rb
424
- - spec/processing_for_travis.rb
452
+ - spec/processing_for_ci.rb
425
453
  - spec/spec_condition.rb
426
454
  - spec/spec_const.rb
427
455
  - spec/spec_helper.rb
@@ -444,7 +472,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
444
472
  - !ruby/object:Gem::Version
445
473
  version: '0'
446
474
  requirements: []
447
- rubygems_version: 3.1.2
475
+ rubygems_version: 3.0.3
448
476
  signing_key:
449
477
  specification_version: 4
450
478
  summary: Ridgepole is a tool to manage DB schema.
@@ -455,7 +483,6 @@ test_files:
455
483
  - spec/fixtures/for_require_relative_spec.rb
456
484
  - spec/hide_pending_formatter.rb
457
485
  - spec/mysql/_migrate/migrate_change_table_option_spec.rb
458
- - spec/mysql/bigint_pk/bigint_pk_spec.rb
459
486
  - spec/mysql/bigint_pk/int_pk_spec.rb
460
487
  - spec/mysql/cli/config_spec.rb
461
488
  - spec/mysql/cli/ridgepole_spec.rb
@@ -538,8 +565,6 @@ test_files:
538
565
  - spec/mysql/migrate/migrate_with_pre_post_query_spec.rb
539
566
  - spec/mysql/migrate/migrate_with_tables_spec.rb
540
567
  - spec/mysql/migrate/migrate_with_verbose_log_spec.rb
541
- - spec/mysql/migrate_/migrate_create_index_with_alter_spec.rb
542
- - spec/mysql/migrate_/migrate_drop_index_with_alter_spec.rb
543
568
  - spec/mysql/ridgepole_test_database.sql
544
569
  - spec/mysql/ridgepole_test_tables.sql
545
570
  - spec/mysql/ridgepole_test_tables_unknown_column_type.sql
@@ -585,7 +610,7 @@ test_files:
585
610
  - spec/postgresql/~default_name_fk/migrate_change_fk_spec.rb
586
611
  - spec/postgresql/~default_name_fk/migrate_create_fk_spec.rb
587
612
  - spec/postgresql/~default_name_fk/migrate_drop_fk_spec.rb
588
- - spec/processing_for_travis.rb
613
+ - spec/processing_for_ci.rb
589
614
  - spec/spec_condition.rb
590
615
  - spec/spec_const.rb
591
616
  - spec/spec_helper.rb
@@ -1,31 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'active_record/connection_adapters/abstract_mysql_adapter'
4
-
5
- module Ridgepole
6
- module Ext
7
- module AbstractMysqlAdapter
8
- module UseAlterIndex
9
- def add_index(table_name, column_name, options = {})
10
- index_name, index_type, index_columns, index_options, _index_algorithm, index_using = add_index_options(table_name, column_name, **options)
11
-
12
- # cannot specify index_algorithm
13
- execute "ALTER TABLE #{quote_table_name(table_name)} ADD #{index_type} INDEX #{quote_column_name(index_name)} #{index_using} (#{index_columns})#{index_options}"
14
- end
15
-
16
- def remove_index(table_name, options)
17
- index_name = index_name_for_remove(table_name, options)
18
- execute "ALTER TABLE #{quote_table_name(table_name)} DROP INDEX #{quote_column_name(index_name)}"
19
- end
20
- end
21
- end
22
- end
23
- end
24
-
25
- module ActiveRecord
26
- module ConnectionAdapters
27
- class AbstractMysqlAdapter
28
- prepend Ridgepole::Ext::AbstractMysqlAdapter::UseAlterIndex
29
- end
30
- end
31
- end
@@ -1,10 +0,0 @@
1
- *.gem
2
- .bundle
3
- .kitchen/
4
- .kitchen.local.yml
5
- vendor/bundle
6
- pkg/*
7
- .vagrant
8
- bin/*
9
- files/**/cache/
10
- vendor/cookbooks
@@ -1,25 +0,0 @@
1
- FROM centos:7
2
-
3
- RUN yum install -y centos-release-scl && \
4
- yum-config-manager --enable rhel-server-rhscl-7-rpms && \
5
- yum install -y \
6
- rh-ruby25-dev \
7
- rh-ruby25-ruby-devel \
8
- make \
9
- gcc \
10
- gcc-c++ \
11
- git \
12
- rpm-build
13
-
14
- RUN scl enable rh-ruby25 -- \
15
- gem install --no-document \
16
- bundler \
17
- omnibus
18
-
19
- COPY Gemfile /
20
- RUN scl enable rh-ruby25 -- \
21
- bundle install
22
-
23
- WORKDIR /omnibus-ridgepole
24
-
25
- ENTRYPOINT ["/usr/bin/scl", "enable", "rh-ruby25", "--"]
@@ -1,21 +0,0 @@
1
- FROM ubuntu:xenial
2
-
3
- RUN apt-get update && \
4
- apt-get install -y software-properties-common
5
-
6
- RUN apt-add-repository -y ppa:brightbox/ruby-ng && \
7
- apt-get update && \
8
- apt-get install -y \
9
- ruby2.5 \
10
- ruby2.5-dev \
11
- build-essential \
12
- git
13
-
14
- RUN gem install --no-document \
15
- bundler \
16
- omnibus
17
-
18
- COPY Gemfile /
19
- RUN bundle install
20
-
21
- WORKDIR /omnibus-ridgepole