ridgepole 0.8.11 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +23 -2
- data/.simplecov +6 -0
- data/Appraisals +4 -5
- data/README.md +22 -41
- data/bin/ridgepole +13 -3
- data/gemfiles/{activerecord_5.0.gemfile → activerecord_6.1.gemfile} +1 -2
- data/lib/ridgepole/client.rb +8 -3
- data/lib/ridgepole/default_limit.rb +1 -1
- data/lib/ridgepole/delta.rb +16 -1
- data/lib/ridgepole/diff.rb +50 -31
- data/lib/ridgepole/dsl_parser/table_definition.rb +46 -43
- data/lib/ridgepole/execute_expander.rb +10 -1
- data/lib/ridgepole/ext/abstract_adapter/disable_table_options.rb +9 -1
- data/lib/ridgepole/external_sql_executer.rb +12 -1
- data/lib/ridgepole/version.rb +1 -1
- data/ridgepole.gemspec +6 -3
- data/spec/erb_helper.rb +1 -1
- data/spec/mysql/_migrate/migrate_change_table_option_spec.rb +2 -2
- data/spec/mysql/bigint_pk/int_pk_spec.rb +1 -1
- data/spec/mysql/cli/ridgepole_spec.rb +35 -1
- data/spec/mysql/collation/collation_spec.rb +14 -14
- data/spec/mysql/comment/comment_spec.rb +9 -9
- data/spec/mysql/diff/diff2_spec.rb +5 -5
- data/spec/mysql/diff/diff_spec.rb +3 -3
- data/spec/mysql/dump/dump_class_method_spec.rb +13 -13
- data/spec/mysql/dump/dump_some_tables_spec.rb +4 -4
- data/spec/mysql/dump/dump_spec.rb +13 -13
- data/spec/mysql/dump/dump_unknown_column_type_spec.rb +2 -2
- data/spec/mysql/dump/dump_without_table_options_spec.rb +2 -2
- data/spec/mysql/fk/migrate_change_fk2_spec.rb +2 -2
- data/spec/mysql/fk/migrate_change_fk_spec.rb +20 -20
- data/spec/mysql/fk/migrate_create_fk_spec.rb +22 -22
- data/spec/mysql/fk/migrate_drop_fk_spec.rb +26 -26
- data/spec/mysql/fk/migrate_fk_with_column_spec.rb +16 -16
- data/spec/mysql/fk/migrate_ignore_fk_spec.rb +6 -6
- data/spec/mysql/migrate/migrate_add_column_order_spec.rb +2 -2
- data/spec/mysql/migrate/migrate_add_column_spec.rb +18 -18
- data/spec/mysql/migrate/migrate_add_column_with_alter_extra_spec.rb +106 -18
- data/spec/mysql/migrate/migrate_add_column_with_script_spec.rb +18 -18
- data/spec/mysql/migrate/migrate_change_column2_spec.rb +5 -5
- data/spec/mysql/migrate/migrate_change_column3_spec.rb +24 -55
- data/spec/mysql/migrate/migrate_change_column5_spec.rb +3 -3
- data/spec/mysql/migrate/migrate_change_column6_spec.rb +7 -7
- data/spec/mysql/migrate/migrate_change_column8_spec.rb +38 -5
- data/spec/mysql/migrate/migrate_change_column_default_spec.rb +2 -14
- data/spec/mysql/migrate/migrate_change_column_spec.rb +21 -21
- data/spec/mysql/migrate/migrate_change_index2_spec.rb +5 -5
- data/spec/mysql/migrate/migrate_change_index3_spec.rb +7 -7
- data/spec/mysql/migrate/migrate_change_index4_spec.rb +6 -6
- data/spec/mysql/migrate/migrate_change_index5_spec.rb +4 -4
- data/spec/mysql/migrate/migrate_change_index6_spec.rb +27 -27
- data/spec/mysql/migrate/migrate_change_index7_spec.rb +4 -4
- data/spec/mysql/migrate/migrate_change_index8_spec.rb +4 -4
- data/spec/mysql/migrate/migrate_change_index_spec.rb +34 -28
- data/spec/mysql/migrate/migrate_check_relation_column_type_spec.rb +5 -5
- data/spec/mysql/migrate/migrate_create_index2_spec.rb +24 -24
- data/spec/mysql/migrate/migrate_create_index_spec.rb +18 -18
- data/spec/mysql/migrate/migrate_create_table_spec.rb +16 -16
- data/spec/mysql/migrate/migrate_create_table_with_ignore_spec.rb +4 -4
- data/spec/mysql/migrate/migrate_create_table_with_index_spec.rb +4 -4
- data/spec/mysql/migrate/migrate_create_table_with_script_spec.rb +16 -16
- data/spec/mysql/migrate/migrate_drop_column_and_index2_spec.rb +18 -18
- data/spec/mysql/migrate/migrate_drop_column_and_index_spec.rb +16 -16
- data/spec/mysql/migrate/migrate_drop_column_and_unique_index_spec.rb +1 -1
- data/spec/mysql/migrate/migrate_drop_column_spec.rb +18 -18
- data/spec/mysql/migrate/migrate_drop_index_spec.rb +15 -15
- data/spec/mysql/migrate/migrate_drop_table_spec.rb +16 -16
- data/spec/mysql/migrate/migrate_empty_spec.rb +9 -9
- data/spec/mysql/migrate/migrate_execute_spec.rb +32 -32
- data/spec/mysql/migrate/migrate_ignore_column_spec.rb +4 -4
- data/spec/mysql/migrate/migrate_ignore_index_spec.rb +5 -5
- data/spec/mysql/migrate/migrate_log_file_spec.rb +16 -16
- data/spec/mysql/migrate/migrate_merge_mode_spec.rb +18 -18
- data/spec/mysql/migrate/migrate_noop_spec.rb +12 -12
- data/spec/mysql/migrate/migrate_primary_key_spec.rb +31 -6
- data/spec/mysql/migrate/migrate_rename_column_spec.rb +18 -18
- data/spec/mysql/migrate/migrate_rename_table_spec.rb +22 -22
- data/spec/mysql/migrate/migrate_same_spec.rb +13 -13
- data/spec/mysql/migrate/migrate_skip_column_comment_change_spec.rb +2 -2
- data/spec/mysql/migrate/migrate_skip_drop_table_spec.rb +18 -18
- data/spec/mysql/migrate/migrate_skip_rename_column_spec.rb +18 -18
- data/spec/mysql/migrate/migrate_skip_rename_table_spec.rb +18 -18
- data/spec/mysql/migrate/migrate_with_pre_post_query_spec.rb +18 -18
- data/spec/mysql/text_blob_types/text_blob_types_spec.rb +2 -2
- data/spec/mysql/~default_name_fk/migrate_change_fk_spec.rb +6 -6
- data/spec/mysql/~default_name_fk/migrate_create_fk_spec.rb +9 -9
- data/spec/mysql/~default_name_fk/migrate_drop_fk_spec.rb +8 -8
- data/spec/mysql/~dump_auto_increment/migrate_create_table_with_index_spec.rb +5 -5
- data/spec/mysql57/json/add_json_column_spec.rb +2 -2
- data/spec/mysql57/json/change_json_column_spec.rb +6 -6
- data/spec/mysql57/json/drop_json_column_spec.rb +2 -2
- data/spec/mysql57/virtual/add_virtual_column_spec.rb +1 -1
- data/spec/mysql57/virtual/change_virtual_column_spec.rb +1 -1
- data/spec/mysql57/virtual/drop_virtual_column_spec.rb +1 -1
- data/spec/postgresql/dump/dump_spec.rb +13 -13
- data/spec/postgresql/fk/migrate_change_fk_spec.rb +6 -6
- data/spec/postgresql/fk/migrate_create_fk_spec.rb +5 -5
- data/spec/postgresql/fk/migrate_drop_fk_spec.rb +8 -8
- data/spec/postgresql/migrate/migrate_add_column_spec.rb +27 -20
- data/spec/postgresql/migrate/migrate_add_expression_index_spec.rb +1 -1
- data/spec/postgresql/migrate/migrate_change_column_spec.rb +20 -16
- data/spec/postgresql/migrate/migrate_change_index_spec.rb +18 -18
- data/spec/postgresql/migrate/migrate_check_relation_column_type_spec.rb +1 -1
- data/spec/postgresql/migrate/migrate_create_table_spec.rb +14 -14
- data/spec/postgresql/migrate/migrate_drop_column_spec.rb +29 -22
- data/spec/postgresql/migrate/migrate_drop_column_with_index_spec.rb +17 -17
- data/spec/postgresql/migrate/migrate_drop_expression_index_spec.rb +3 -3
- data/spec/postgresql/migrate/migrate_drop_index_spec.rb +15 -15
- data/spec/postgresql/migrate/migrate_drop_table_spec.rb +16 -16
- data/spec/postgresql/migrate/migrate_primary_key2_spec.rb +1 -1
- data/spec/postgresql/migrate/migrate_primary_key_spec.rb +1 -1
- data/spec/postgresql/migrate/migrate_references_spec.rb +6 -6
- data/spec/postgresql/migrate/migrate_rename_column_spec.rb +18 -18
- data/spec/postgresql/migrate/migrate_rename_table_spec.rb +20 -20
- data/spec/postgresql/migrate/migrate_same_spec.rb +13 -13
- data/spec/postgresql/~default_name_fk/migrate_change_fk_spec.rb +3 -3
- data/spec/postgresql/~default_name_fk/migrate_create_fk_spec.rb +4 -4
- data/spec/postgresql/~default_name_fk/migrate_drop_fk_spec.rb +4 -4
- data/spec/processing_for_ci.rb +13 -0
- data/spec/spec_helper.rb +1 -1
- metadata +69 -44
- data/lib/ridgepole/ext/abstract_mysql_adapter/use_alter_index.rb +0 -31
- data/omnibus-ridgepole/.gitignore +0 -10
- data/omnibus-ridgepole/Dockerfile.centos +0 -25
- data/omnibus-ridgepole/Dockerfile.ubuntu +0 -21
- data/omnibus-ridgepole/Gemfile +0 -24
- data/omnibus-ridgepole/README.md +0 -15
- data/omnibus-ridgepole/Rakefile +0 -38
- data/omnibus-ridgepole/config/projects/ridgepole.rb +0 -27
- data/omnibus-ridgepole/config/software/ridgepole.rb +0 -13
- data/omnibus-ridgepole/omnibus.rb +0 -54
- data/omnibus-ridgepole/package-scripts/ridgepole/postinst +0 -1
- data/omnibus-ridgepole/package-scripts/ridgepole/postrm +0 -1
- data/spec/mysql/bigint_pk/bigint_pk_spec.rb +0 -47
- data/spec/mysql/migrate_/migrate_create_index_with_alter_spec.rb +0 -141
- data/spec/mysql/migrate_/migrate_drop_index_with_alter_spec.rb +0 -141
- 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"
|
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"
|
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"
|
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"
|
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"
|
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"
|
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"
|
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"
|
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"
|
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"
|
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"
|
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_helper.rb
CHANGED
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.
|
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:
|
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.
|
19
|
+
version: '5.1'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '6.
|
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.
|
29
|
+
version: '5.1'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '6.
|
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.
|
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.
|
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/
|
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.
|
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/
|
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,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
|