ridgepole 0.8.13 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (139) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test.yml +27 -20
  3. data/.rubocop.yml +5 -4
  4. data/.simplecov +6 -0
  5. data/Appraisals +4 -5
  6. data/README.md +24 -43
  7. data/bin/ridgepole +13 -3
  8. data/gemfiles/{activerecord_5.0.gemfile → activerecord_6.1.gemfile} +1 -2
  9. data/lib/ridgepole/client.rb +8 -3
  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 +8 -1
  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 +4 -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 +88 -20
  33. data/spec/mysql/fk/migrate_create_fk_spec.rb +77 -22
  34. data/spec/mysql/fk/migrate_drop_fk_spec.rb +81 -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 +10 -10
  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 +78 -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 +16 -16
  101. data/spec/postgresql/migrate/migrate_add_expression_index_spec.rb +1 -1
  102. data/spec/postgresql/migrate/migrate_change_column_spec.rb +16 -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 +18 -18
  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_const.rb +1 -1
  122. data/spec/spec_helper.rb +2 -1
  123. metadata +43 -46
  124. data/lib/ridgepole/ext/abstract_mysql_adapter/use_alter_index.rb +0 -31
  125. data/omnibus-ridgepole/.gitignore +0 -10
  126. data/omnibus-ridgepole/Dockerfile.centos +0 -25
  127. data/omnibus-ridgepole/Dockerfile.ubuntu +0 -21
  128. data/omnibus-ridgepole/Gemfile +0 -24
  129. data/omnibus-ridgepole/README.md +0 -15
  130. data/omnibus-ridgepole/Rakefile +0 -38
  131. data/omnibus-ridgepole/config/projects/ridgepole.rb +0 -27
  132. data/omnibus-ridgepole/config/software/ridgepole.rb +0 -13
  133. data/omnibus-ridgepole/omnibus.rb +0 -54
  134. data/omnibus-ridgepole/package-scripts/ridgepole/postinst +0 -1
  135. data/omnibus-ridgepole/package-scripts/ridgepole/postrm +0 -1
  136. data/spec/mysql/bigint_pk/bigint_pk_spec.rb +0 -47
  137. data/spec/mysql/migrate_/migrate_create_index_with_alter_spec.rb +0 -141
  138. data/spec/mysql/migrate_/migrate_drop_index_with_alter_spec.rb +0 -141
  139. data/spec/processing_for_travis.rb +0 -11
@@ -4,14 +4,14 @@ describe 'Ridgepole::Client#diff -> migrate' do
4
4
  context 'when database and definition are same' do
5
5
  let(:dsl) do
6
6
  erbh(<<-ERB)
7
- create_table "clubs", <%= i cond('>= 5.1',id: :serial) + {force: :cascade} %> do |t|
7
+ create_table "clubs", id: :serial, force: :cascade do |t|
8
8
  t.string "name", limit: 255, default: "", null: false
9
- t.index ["name"], name: "idx_name", unique: true, <%= i cond(5.0, using: :btree) %>
9
+ t.index ["name"], name: "idx_name", unique: true
10
10
  end
11
11
 
12
- create_table "departments", primary_key: "dept_no", id: :string, limit: 4, force: :cascade do |t|
12
+ create_table "departments", primary_key: "dept_no", <%= i cond(">= 6.1", { id: { type: :string, limit: 4 } }, { id: :string, limit: 4 }) %>, force: :cascade do |t|
13
13
  t.string "dept_name", limit: 40, null: false
14
- t.index ["dept_name"], name: "idx_dept_name", unique: true, <%= i cond(5.0, using: :btree) %>
14
+ t.index ["dept_name"], name: "idx_dept_name", unique: true
15
15
  end
16
16
 
17
17
  create_table "dept_emp", primary_key: ["emp_no", "dept_no"], force: :cascade do |t|
@@ -19,8 +19,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
19
19
  t.string "dept_no", limit: 4, null: false
20
20
  t.date "from_date", null: false
21
21
  t.date "to_date", null: false
22
- t.index ["dept_no"], name: "idx_dept_emp_dept_no", <%= i cond(5.0, using: :btree) %>
23
- t.index ["emp_no"], name: "idx_dept_emp_emp_no", <%= i cond(5.0, using: :btree) %>
22
+ t.index ["dept_no"], name: "idx_dept_emp_dept_no"
23
+ t.index ["emp_no"], name: "idx_dept_emp_emp_no"
24
24
  end
25
25
 
26
26
  create_table "dept_manager", primary_key: ["emp_no", "dept_no"], force: :cascade do |t|
@@ -28,17 +28,17 @@ describe 'Ridgepole::Client#diff -> migrate' do
28
28
  t.integer "emp_no", null: false
29
29
  t.date "from_date", null: false
30
30
  t.date "to_date", null: false
31
- t.index ["dept_no"], name: "idx_dept_manager_dept_no", <%= i cond(5.0, using: :btree) %>
32
- t.index ["emp_no"], name: "idx_dept_manager_emp_no", <%= i cond(5.0, using: :btree) %>
31
+ t.index ["dept_no"], name: "idx_dept_manager_dept_no"
32
+ t.index ["emp_no"], name: "idx_dept_manager_emp_no"
33
33
  end
34
34
 
35
- create_table "employee_clubs", <%= i cond('>= 5.1',id: :serial) + {force: :cascade} %> do |t|
35
+ create_table "employee_clubs", id: :serial, force: :cascade do |t|
36
36
  t.integer "emp_no", null: false
37
37
  t.integer "club_id", null: false
38
- t.index ["emp_no", "club_id"], name: "idx_employee_clubs_emp_no_club_id", <%= i cond(5.0, using: :btree) %>
38
+ t.index ["emp_no", "club_id"], name: "idx_employee_clubs_emp_no_club_id"
39
39
  end
40
40
 
41
- create_table "employees", primary_key: "emp_no", <%= i({id: :integer} + cond('>= 5.1',default: nil) + {force: :cascade}) %> do |t|
41
+ create_table "employees", primary_key: "emp_no", id: :integer, default: nil, force: :cascade do |t|
42
42
  t.date "birth_date", null: false
43
43
  t.string "first_name", limit: 14, null: false
44
44
  t.string "last_name", limit: 16, null: false
@@ -50,7 +50,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
50
50
  t.integer "salary", null: false
51
51
  t.date "from_date", null: false
52
52
  t.date "to_date", null: false
53
- t.index ["emp_no"], name: "idx_salaries_emp_no", <%= i cond(5.0, using: :btree) %>
53
+ t.index ["emp_no"], name: "idx_salaries_emp_no"
54
54
  end
55
55
 
56
56
  create_table "titles", primary_key: ["emp_no", "title", "from_date"], force: :cascade do |t|
@@ -58,7 +58,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
58
58
  t.string "title", limit: 50, null: false
59
59
  t.date "from_date", null: false
60
60
  t.date "to_date"
61
- t.index ["emp_no"], name: "idx_titles_emp_no", <%= i cond(5.0, using: :btree) %>
61
+ t.index ["emp_no"], name: "idx_titles_emp_no"
62
62
  end
63
63
  ERB
64
64
  end
@@ -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
data/spec/spec_const.rb CHANGED
@@ -5,7 +5,7 @@ TEST_MYSQL_PORT = ENV['MYSQL57'] == '1' ? 13_317 : 13_316
5
5
  TEST_MYSQL_USER = 'root'
6
6
  TEST_MYSQL_PASS = 'password'
7
7
 
8
- MYSQL_CLI = "mysql -h #{TEST_MYSQL_HOST} -P #{TEST_MYSQL_PORT} -u #{TEST_MYSQL_USER} -p#{TEST_MYSQL_PASS} 2>/dev/null"
8
+ MYSQL_CLI = "mysql -h #{TEST_MYSQL_HOST} -P #{TEST_MYSQL_PORT} -u #{TEST_MYSQL_USER} -p#{TEST_MYSQL_PASS} --ssl-mode=DISABLED 2>/dev/null"
9
9
 
10
10
  TEST_PG_HOST = ENV['DOCKER_HOST'] ? ENV['DOCKER_HOST'].gsub(%r{\Atcp://|:\d+\z}, '') : '127.0.0.1'
11
11
  TEST_PG_PORT = 15_442
data/spec/spec_helper.rb CHANGED
@@ -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'
@@ -132,6 +132,7 @@ module SpecHelper
132
132
  port: TEST_MYSQL_PORT,
133
133
  username: TEST_MYSQL_USER,
134
134
  password: TEST_MYSQL_PASS,
135
+ ssl_mode: 'DISABLED',
135
136
  }.merge(config)
136
137
  end
137
138
  end
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.13
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-28 00:00:00.000000000 Z
11
+ date: 2021-03-13 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
@@ -216,16 +202,16 @@ dependencies:
216
202
  name: rubocop
217
203
  requirement: !ruby/object:Gem::Requirement
218
204
  requirements:
219
- - - ">="
205
+ - - '='
220
206
  - !ruby/object:Gem::Version
221
- version: 1.7.0
207
+ version: 1.9.1
222
208
  type: :development
223
209
  prerelease: false
224
210
  version_requirements: !ruby/object:Gem::Requirement
225
211
  requirements:
226
- - - ">="
212
+ - - '='
227
213
  - !ruby/object:Gem::Version
228
- version: 1.7.0
214
+ version: 1.9.1
229
215
  - !ruby/object:Gem::Dependency
230
216
  name: rubocop-rake
231
217
  requirement: !ruby/object:Gem::Requirement
@@ -254,6 +240,34 @@ dependencies:
254
240
  - - ">="
255
241
  - !ruby/object:Gem::Version
256
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'
257
271
  description: Ridgepole is a tool to manage DB schema. It defines DB schema using Rails
258
272
  DSL, and updates DB schema according to DSL.
259
273
  email:
@@ -267,6 +281,7 @@ files:
267
281
  - ".gitignore"
268
282
  - ".rspec"
269
283
  - ".rubocop.yml"
284
+ - ".simplecov"
270
285
  - Appraisals
271
286
  - Gemfile
272
287
  - LICENSE.txt
@@ -274,10 +289,10 @@ files:
274
289
  - Rakefile
275
290
  - bin/ridgepole
276
291
  - docker-compose.yml
277
- - gemfiles/activerecord_5.0.gemfile
278
292
  - gemfiles/activerecord_5.1.gemfile
279
293
  - gemfiles/activerecord_5.2.gemfile
280
294
  - gemfiles/activerecord_6.0.gemfile
295
+ - gemfiles/activerecord_6.1.gemfile
281
296
  - lib/ridgepole.rb
282
297
  - lib/ridgepole/cli/config.rb
283
298
  - lib/ridgepole/client.rb
@@ -292,7 +307,6 @@ files:
292
307
  - lib/ridgepole/execute_expander.rb
293
308
  - lib/ridgepole/ext/abstract_adapter/disable_table_options.rb
294
309
  - lib/ridgepole/ext/abstract_mysql_adapter/dump_auto_increment.rb
295
- - lib/ridgepole/ext/abstract_mysql_adapter/use_alter_index.rb
296
310
  - lib/ridgepole/ext/pp_sort_hash.rb
297
311
  - lib/ridgepole/ext/schema_dumper.rb
298
312
  - lib/ridgepole/external_sql_executer.rb
@@ -301,17 +315,6 @@ files:
301
315
  - lib/ridgepole/schema_dumper_ext.rb
302
316
  - lib/ridgepole/schema_statements_ext.rb
303
317
  - lib/ridgepole/version.rb
304
- - omnibus-ridgepole/.gitignore
305
- - omnibus-ridgepole/Dockerfile.centos
306
- - omnibus-ridgepole/Dockerfile.ubuntu
307
- - omnibus-ridgepole/Gemfile
308
- - omnibus-ridgepole/README.md
309
- - omnibus-ridgepole/Rakefile
310
- - omnibus-ridgepole/config/projects/ridgepole.rb
311
- - omnibus-ridgepole/config/software/ridgepole.rb
312
- - omnibus-ridgepole/omnibus.rb
313
- - omnibus-ridgepole/package-scripts/ridgepole/postinst
314
- - omnibus-ridgepole/package-scripts/ridgepole/postrm
315
318
  - ridgepole.gemspec
316
319
  - spec/cli_helper.rb
317
320
  - spec/dsl_parser/context_spec.rb
@@ -319,7 +322,6 @@ files:
319
322
  - spec/fixtures/for_require_relative_spec.rb
320
323
  - spec/hide_pending_formatter.rb
321
324
  - spec/mysql/_migrate/migrate_change_table_option_spec.rb
322
- - spec/mysql/bigint_pk/bigint_pk_spec.rb
323
325
  - spec/mysql/bigint_pk/int_pk_spec.rb
324
326
  - spec/mysql/cli/config_spec.rb
325
327
  - spec/mysql/cli/ridgepole_spec.rb
@@ -402,8 +404,6 @@ files:
402
404
  - spec/mysql/migrate/migrate_with_pre_post_query_spec.rb
403
405
  - spec/mysql/migrate/migrate_with_tables_spec.rb
404
406
  - spec/mysql/migrate/migrate_with_verbose_log_spec.rb
405
- - spec/mysql/migrate_/migrate_create_index_with_alter_spec.rb
406
- - spec/mysql/migrate_/migrate_drop_index_with_alter_spec.rb
407
407
  - spec/mysql/ridgepole_test_database.sql
408
408
  - spec/mysql/ridgepole_test_tables.sql
409
409
  - spec/mysql/ridgepole_test_tables_unknown_column_type.sql
@@ -449,7 +449,7 @@ files:
449
449
  - spec/postgresql/~default_name_fk/migrate_change_fk_spec.rb
450
450
  - spec/postgresql/~default_name_fk/migrate_create_fk_spec.rb
451
451
  - spec/postgresql/~default_name_fk/migrate_drop_fk_spec.rb
452
- - spec/processing_for_travis.rb
452
+ - spec/processing_for_ci.rb
453
453
  - spec/spec_condition.rb
454
454
  - spec/spec_const.rb
455
455
  - spec/spec_helper.rb
@@ -472,7 +472,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
472
472
  - !ruby/object:Gem::Version
473
473
  version: '0'
474
474
  requirements: []
475
- rubygems_version: 3.1.2
475
+ rubygems_version: 3.0.3
476
476
  signing_key:
477
477
  specification_version: 4
478
478
  summary: Ridgepole is a tool to manage DB schema.
@@ -483,7 +483,6 @@ test_files:
483
483
  - spec/fixtures/for_require_relative_spec.rb
484
484
  - spec/hide_pending_formatter.rb
485
485
  - spec/mysql/_migrate/migrate_change_table_option_spec.rb
486
- - spec/mysql/bigint_pk/bigint_pk_spec.rb
487
486
  - spec/mysql/bigint_pk/int_pk_spec.rb
488
487
  - spec/mysql/cli/config_spec.rb
489
488
  - spec/mysql/cli/ridgepole_spec.rb
@@ -566,8 +565,6 @@ test_files:
566
565
  - spec/mysql/migrate/migrate_with_pre_post_query_spec.rb
567
566
  - spec/mysql/migrate/migrate_with_tables_spec.rb
568
567
  - spec/mysql/migrate/migrate_with_verbose_log_spec.rb
569
- - spec/mysql/migrate_/migrate_create_index_with_alter_spec.rb
570
- - spec/mysql/migrate_/migrate_drop_index_with_alter_spec.rb
571
568
  - spec/mysql/ridgepole_test_database.sql
572
569
  - spec/mysql/ridgepole_test_tables.sql
573
570
  - spec/mysql/ridgepole_test_tables_unknown_column_type.sql
@@ -613,7 +610,7 @@ test_files:
613
610
  - spec/postgresql/~default_name_fk/migrate_change_fk_spec.rb
614
611
  - spec/postgresql/~default_name_fk/migrate_create_fk_spec.rb
615
612
  - spec/postgresql/~default_name_fk/migrate_drop_fk_spec.rb
616
- - spec/processing_for_travis.rb
613
+ - spec/processing_for_ci.rb
617
614
  - spec/spec_condition.rb
618
615
  - spec/spec_const.rb
619
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