ridgepole 0.7.1 → 0.7.2.beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +4 -3
- data/Appraisals +8 -0
- data/README.md +2 -0
- data/docker-compose.yml +2 -2
- data/gemfiles/activerecord_5.2.gemfile +11 -0
- data/lib/ridgepole/ext/schema_dumper.rb +1 -1
- data/lib/ridgepole/schema_statements_ext.rb +2 -2
- data/lib/ridgepole/version.rb +1 -1
- data/ridgepole.gemspec +1 -0
- data/spec/erb_helper.rb +3 -1
- data/spec/mysql/_migrate/migrate_change_table_option_spec.rb +5 -5
- data/spec/mysql/bigint_pk/int_pk_spec.rb +2 -2
- data/spec/mysql/collation/collation_spec.rb +15 -15
- data/spec/mysql/comment/comment_spec.rb +10 -10
- data/spec/mysql/default_lambda/default_lambda_spec.rb +2 -2
- data/spec/mysql/diff/diff2_spec.rb +4 -4
- data/spec/mysql/diff/diff_spec.rb +4 -4
- data/spec/mysql/dump/dump_class_method_spec.rb +3 -3
- data/spec/mysql/dump/dump_some_tables_spec.rb +2 -2
- data/spec/mysql/dump/dump_spec.rb +3 -3
- data/spec/mysql/dump/dump_unknown_column_type_spec.rb +1 -1
- data/spec/mysql/dump/dump_without_table_options_spec.rb +2 -2
- data/spec/mysql/fk/migrate_change_fk_spec.rb +16 -16
- data/spec/mysql/fk/migrate_create_fk_spec.rb +14 -14
- data/spec/mysql/fk/migrate_drop_fk_spec.rb +18 -18
- data/spec/mysql/migrate/migrate_add_column2_spec.rb +8 -8
- data/spec/mysql/migrate/migrate_add_column_order_spec.rb +12 -12
- data/spec/mysql/migrate/migrate_add_column_spec.rb +4 -4
- data/spec/mysql/migrate/migrate_add_column_with_alter_extra_spec.rb +2 -2
- data/spec/mysql/migrate/migrate_add_column_with_script_spec.rb +2 -2
- data/spec/mysql/migrate/migrate_change_column2_spec.rb +2 -2
- data/spec/mysql/migrate/migrate_change_column3_spec.rb +14 -14
- data/spec/mysql/migrate/migrate_change_column5_spec.rb +4 -4
- data/spec/mysql/migrate/migrate_change_column6_spec.rb +11 -11
- data/spec/mysql/migrate/migrate_change_column7_spec.rb +2 -2
- data/spec/mysql/migrate/migrate_change_column_default_spec.rb +20 -20
- data/spec/mysql/migrate/migrate_change_column_float_spec.rb +9 -4
- data/spec/mysql/migrate/migrate_change_column_spec.rb +7 -7
- data/spec/mysql/migrate/migrate_change_index2_spec.rb +2 -2
- data/spec/mysql/migrate/migrate_change_index3_spec.rb +4 -4
- data/spec/mysql/migrate/migrate_change_index4_spec.rb +6 -6
- data/spec/mysql/migrate/migrate_change_index5_spec.rb +2 -2
- data/spec/mysql/migrate/migrate_change_index6_spec.rb +2 -2
- data/spec/mysql/migrate/migrate_change_index7_spec.rb +7 -7
- data/spec/mysql/migrate/migrate_change_index8_spec.rb +7 -7
- data/spec/mysql/migrate/migrate_change_index_spec.rb +3 -3
- data/spec/mysql/migrate/migrate_change_table_option_spec.rb +4 -4
- data/spec/mysql/migrate/migrate_check_relation_column_type_spec.rb +8 -8
- data/spec/mysql/migrate/migrate_create_index2_spec.rb +2 -2
- data/spec/mysql/migrate/migrate_create_index_spec.rb +4 -4
- data/spec/mysql/migrate/migrate_create_table_spec.rb +2 -2
- data/spec/mysql/migrate/migrate_create_table_with_index_spec.rb +2 -2
- data/spec/mysql/migrate/migrate_create_table_with_script_spec.rb +2 -2
- data/spec/mysql/migrate/migrate_drop_column_and_index2_spec.rb +4 -4
- data/spec/mysql/migrate/migrate_drop_column_and_index_spec.rb +6 -6
- data/spec/mysql/migrate/migrate_drop_column_and_unique_index_spec.rb +4 -4
- data/spec/mysql/migrate/migrate_drop_column_spec.rb +4 -4
- data/spec/mysql/migrate/migrate_drop_index_spec.rb +4 -4
- data/spec/mysql/migrate/migrate_drop_table_spec.rb +2 -2
- data/spec/mysql/migrate/migrate_empty_spec.rb +2 -2
- data/spec/mysql/migrate/migrate_execute_spec.rb +23 -23
- data/spec/mysql/migrate/migrate_log_file_spec.rb +2 -2
- data/spec/mysql/migrate/migrate_merge_mode_spec.rb +2 -2
- data/spec/mysql/migrate/migrate_noop_spec.rb +27 -27
- data/spec/mysql/migrate/migrate_primary_key_spec.rb +2 -2
- data/spec/mysql/migrate/migrate_rename_column_spec.rb +4 -4
- data/spec/mysql/migrate/migrate_rename_table_spec.rb +4 -4
- data/spec/mysql/migrate/migrate_same_default_null_spec.rb +4 -4
- data/spec/mysql/migrate/migrate_same_spec.rb +5 -5
- data/spec/mysql/migrate/migrate_script_error_spec.rb +1 -1
- data/spec/mysql/migrate/migrate_skip_drop_table_spec.rb +2 -2
- data/spec/mysql/migrate/migrate_skip_rename_column_spec.rb +2 -2
- data/spec/mysql/migrate/migrate_skip_rename_table_spec.rb +2 -2
- data/spec/mysql/migrate/migrate_with_ignore_tables_spec.rb +2 -2
- data/spec/mysql/migrate/migrate_with_pre_post_query_spec.rb +2 -2
- data/spec/mysql/migrate/migrate_with_tables_spec.rb +2 -2
- data/spec/mysql/migrate/migrate_with_verbose_log_spec.rb +2 -2
- data/spec/mysql/migrate_/migrate_create_index_with_alter_spec.rb +2 -2
- data/spec/mysql/migrate_/migrate_drop_index_with_alter_spec.rb +2 -2
- data/spec/mysql/text_blob_types/text_blob_types_spec.rb +1 -1
- data/spec/mysql/~default_name_fk/migrate_change_fk_spec.rb +4 -4
- data/spec/mysql/~default_name_fk/migrate_create_fk_spec.rb +9 -9
- data/spec/mysql/~default_name_fk/migrate_drop_fk_spec.rb +6 -6
- data/spec/mysql/~dump_auto_increment/migrate_create_table_with_index_spec.rb +2 -2
- 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 +2 -2
- data/spec/mysql57/virtual/change_virtual_column_spec.rb +2 -2
- data/spec/mysql57/virtual/drop_virtual_column_spec.rb +2 -2
- data/spec/postgresql/dump/dump_spec.rb +3 -3
- data/spec/postgresql/fk/migrate_change_fk_spec.rb +2 -2
- data/spec/postgresql/fk/migrate_create_fk_spec.rb +8 -8
- data/spec/postgresql/fk/migrate_drop_fk_spec.rb +4 -4
- data/spec/postgresql/migrate/migrate_add_column_spec.rb +6 -6
- data/spec/postgresql/migrate/migrate_bigint_spec.rb +2 -2
- data/spec/postgresql/migrate/migrate_change_column_default_spec.rb +2 -2
- data/spec/postgresql/migrate/migrate_change_column_spec.rb +4 -4
- data/spec/postgresql/migrate/migrate_change_index_spec.rb +3 -3
- data/spec/postgresql/migrate/migrate_check_relation_column_type_spec.rb +4 -4
- data/spec/postgresql/migrate/migrate_create_table_spec.rb +2 -2
- data/spec/postgresql/migrate/migrate_create_table_with_default_proc_spec.rb +8 -8
- data/spec/postgresql/migrate/migrate_drop_column_spec.rb +4 -4
- data/spec/postgresql/migrate/migrate_drop_column_with_index_spec.rb +6 -6
- data/spec/postgresql/migrate/migrate_drop_index_spec.rb +4 -4
- data/spec/postgresql/migrate/migrate_drop_table_spec.rb +2 -2
- data/spec/postgresql/migrate/migrate_ext_cols_spec.rb +2 -2
- data/spec/postgresql/migrate/migrate_references_spec.rb +6 -6
- data/spec/postgresql/migrate/migrate_rename_column_spec.rb +4 -4
- data/spec/postgresql/migrate/migrate_rename_table_spec.rb +4 -4
- data/spec/postgresql/migrate/migrate_same_spec.rb +5 -5
- data/spec/postgresql/~default_name_fk/migrate_change_fk_spec.rb +1 -1
- data/spec/postgresql/~default_name_fk/migrate_create_fk_spec.rb +4 -4
- data/spec/postgresql/~default_name_fk/migrate_drop_fk_spec.rb +2 -2
- data/spec/spec_condition.rb +7 -0
- data/spec/spec_helper.rb +1 -0
- metadata +19 -4
|
@@ -27,9 +27,9 @@ describe 'Ridgepole::Client#diff -> migrate', condition: 5.1 do
|
|
|
27
27
|
it {
|
|
28
28
|
delta = subject.diff(expected_dsl)
|
|
29
29
|
expect(delta.differ?).to be_truthy
|
|
30
|
-
expect(subject.dump).to
|
|
30
|
+
expect(subject.dump).to match_ruby actual_dsl
|
|
31
31
|
delta.migrate
|
|
32
|
-
expect(subject.dump).to
|
|
32
|
+
expect(subject.dump).to match_ruby expected_dsl
|
|
33
33
|
}
|
|
34
34
|
end
|
|
35
35
|
end
|
|
@@ -5,7 +5,7 @@ describe 'Ridgepole::Client#dump' do
|
|
|
5
5
|
|
|
6
6
|
it {
|
|
7
7
|
expect(subject.dump).to match_fuzzy erbh(<<-EOS)
|
|
8
|
-
create_table "clubs", <%= i cond(5.1,
|
|
8
|
+
create_table "clubs", <%= i cond('>= 5.1',id: :serial) + {force: :cascade} %> do |t|
|
|
9
9
|
t.string "name", limit: 255, default: "", null: false
|
|
10
10
|
t.index ["name"], name: "idx_name", unique: true, <%= i cond(5.0, using: :btree) %>
|
|
11
11
|
end
|
|
@@ -33,13 +33,13 @@ describe 'Ridgepole::Client#dump' do
|
|
|
33
33
|
t.index ["emp_no"], name: "idx_dept_manager_emp_no", <%= i cond(5.0, using: :btree) %>
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
-
create_table "employee_clubs", <%= i cond(5.1,
|
|
36
|
+
create_table "employee_clubs", <%= i cond('>= 5.1',id: :serial) + {force: :cascade} %> do |t|
|
|
37
37
|
t.integer "emp_no", null: false
|
|
38
38
|
t.integer "club_id", null: false
|
|
39
39
|
t.index ["emp_no", "club_id"], name: "idx_employee_clubs_emp_no_club_id", <%= i cond(5.0, using: :btree) %>
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
-
create_table "employees", primary_key: "emp_no", id: :integer, <%= i cond(5.1,
|
|
42
|
+
create_table "employees", primary_key: "emp_no", id: :integer, <%= i cond('>= 5.1',default: nil) %>, force: :cascade do |t|
|
|
43
43
|
t.date "birth_date", null: false
|
|
44
44
|
t.string "first_name", limit: 14, null: false
|
|
45
45
|
t.string "last_name", limit: 16, null: false
|
|
@@ -51,7 +51,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
|
51
51
|
expect(delta.differ?).to be_truthy
|
|
52
52
|
expect(subject.dump).to match_fuzzy sorted_actual_dsl
|
|
53
53
|
delta.migrate
|
|
54
|
-
expect(subject.dump).to
|
|
54
|
+
expect(subject.dump).to match_ruby expected_dsl
|
|
55
55
|
}
|
|
56
56
|
end
|
|
57
57
|
|
|
@@ -107,7 +107,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
|
107
107
|
expect(delta.differ?).to be_truthy
|
|
108
108
|
expect(subject.dump).to match_fuzzy sorted_actual_dsl
|
|
109
109
|
delta.migrate
|
|
110
|
-
expect(subject.dump).to
|
|
110
|
+
expect(subject.dump).to match_ruby expected_dsl
|
|
111
111
|
}
|
|
112
112
|
end
|
|
113
113
|
end
|
|
@@ -24,20 +24,20 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
|
24
24
|
it {
|
|
25
25
|
delta = subject.diff(expected_dsl)
|
|
26
26
|
expect(delta.differ?).to be_truthy
|
|
27
|
-
expect(subject.dump).to
|
|
27
|
+
expect(subject.dump).to match_ruby actual_dsl
|
|
28
28
|
delta.migrate
|
|
29
|
-
expect(subject.dump).to
|
|
29
|
+
expect(subject.dump).to match_ruby expected_dsl
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
it {
|
|
33
33
|
delta = client(bulk_change: true).diff(expected_dsl)
|
|
34
34
|
expect(delta.differ?).to be_truthy
|
|
35
|
-
expect(subject.dump).to
|
|
35
|
+
expect(subject.dump).to match_ruby actual_dsl
|
|
36
36
|
expect(delta.script).to match_fuzzy <<-EOS
|
|
37
37
|
add_foreign_key("child", "parent", {:name=>"child_ibfk_1"})
|
|
38
38
|
EOS
|
|
39
39
|
delta.migrate
|
|
40
|
-
expect(subject.dump).to
|
|
40
|
+
expect(subject.dump).to match_ruby expected_dsl
|
|
41
41
|
}
|
|
42
42
|
end
|
|
43
43
|
|
|
@@ -135,20 +135,20 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
|
135
135
|
it {
|
|
136
136
|
delta = subject.diff(expected_dsl)
|
|
137
137
|
expect(delta.differ?).to be_truthy
|
|
138
|
-
expect(subject.dump).to
|
|
138
|
+
expect(subject.dump).to match_ruby actual_dsl
|
|
139
139
|
delta.migrate
|
|
140
|
-
expect(subject.dump).to
|
|
140
|
+
expect(subject.dump).to match_ruby expected_dsl
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
it {
|
|
144
144
|
delta = client(bulk_change: true).diff(expected_dsl)
|
|
145
145
|
expect(delta.differ?).to be_truthy
|
|
146
|
-
expect(subject.dump).to
|
|
146
|
+
expect(subject.dump).to match_ruby actual_dsl
|
|
147
147
|
expect(delta.script).to match_fuzzy <<-EOS
|
|
148
148
|
add_foreign_key("child", "parent", {})
|
|
149
149
|
EOS
|
|
150
150
|
delta.migrate
|
|
151
|
-
expect(subject.dump).to
|
|
151
|
+
expect(subject.dump).to match_ruby expected_dsl
|
|
152
152
|
}
|
|
153
153
|
end
|
|
154
154
|
|
|
@@ -40,7 +40,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
|
40
40
|
expect(delta.differ?).to be_truthy
|
|
41
41
|
expect(subject.dump).to match_fuzzy sorted_actual_dsl
|
|
42
42
|
delta.migrate
|
|
43
|
-
expect(subject.dump).to
|
|
43
|
+
expect(subject.dump).to match_ruby expected_dsl
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
it {
|
|
@@ -51,7 +51,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
|
51
51
|
remove_foreign_key("child", {:name=>"child_ibfk_1"})
|
|
52
52
|
EOS
|
|
53
53
|
delta.migrate
|
|
54
|
-
expect(subject.dump).to
|
|
54
|
+
expect(subject.dump).to match_ruby expected_dsl
|
|
55
55
|
}
|
|
56
56
|
end
|
|
57
57
|
|
|
@@ -137,7 +137,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
|
137
137
|
expect(delta.differ?).to be_truthy
|
|
138
138
|
expect(subject.dump).to match_fuzzy sorted_actual_dsl
|
|
139
139
|
delta.migrate
|
|
140
|
-
expect(subject.dump).to
|
|
140
|
+
expect(subject.dump).to match_ruby expected_dsl
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
it {
|
|
@@ -148,7 +148,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
|
148
148
|
remove_foreign_key("child", "parent")
|
|
149
149
|
EOS
|
|
150
150
|
delta.migrate
|
|
151
|
-
expect(subject.dump).to
|
|
151
|
+
expect(subject.dump).to match_ruby expected_dsl
|
|
152
152
|
}
|
|
153
153
|
end
|
|
154
154
|
|
|
@@ -129,15 +129,15 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
|
129
129
|
it {
|
|
130
130
|
delta = subject.diff(expected_dsl)
|
|
131
131
|
expect(delta.differ?).to be_truthy
|
|
132
|
-
expect(subject.dump).to
|
|
132
|
+
expect(subject.dump).to match_ruby actual_dsl
|
|
133
133
|
delta.migrate
|
|
134
|
-
expect(subject.dump).to
|
|
134
|
+
expect(subject.dump).to match_ruby expected_dsl
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
it {
|
|
138
138
|
delta = client(:bulk_change => true).diff(expected_dsl)
|
|
139
139
|
expect(delta.differ?).to be_truthy
|
|
140
|
-
expect(subject.dump).to
|
|
140
|
+
expect(subject.dump).to match_ruby actual_dsl
|
|
141
141
|
expect(delta.script).to match_fuzzy <<-EOS
|
|
142
142
|
change_table("employee_clubs", {:bulk => true}) do |t|
|
|
143
143
|
t.column("any_col", :string, {:limit=>255, :null=>false})
|
|
@@ -149,7 +149,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
|
149
149
|
end
|
|
150
150
|
EOS
|
|
151
151
|
delta.migrate
|
|
152
|
-
expect(subject.dump).to
|
|
152
|
+
expect(subject.dump).to match_ruby expected_dsl
|
|
153
153
|
}
|
|
154
154
|
end
|
|
155
155
|
|
|
@@ -183,10 +183,10 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
|
183
183
|
it {
|
|
184
184
|
delta = subject.diff(expected_dsl)
|
|
185
185
|
expect(delta.differ?).to be_truthy
|
|
186
|
-
expect(subject.dump).to
|
|
186
|
+
expect(subject.dump).to match_ruby actual_dsl
|
|
187
187
|
migrated, sql = delta.migrate(:noop => true)
|
|
188
188
|
expect(migrated).to be_truthy
|
|
189
|
-
expect(subject.dump).to
|
|
189
|
+
expect(subject.dump).to match_ruby actual_dsl
|
|
190
190
|
|
|
191
191
|
expect(sql).to match_fuzzy("ALTER TABLE \"dept_emp\" ADD \"emp_no2\" integer NOT NULL")
|
|
192
192
|
}
|
|
@@ -17,7 +17,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
|
17
17
|
delta = subject.diff(expected_dsl)
|
|
18
18
|
expect(delta.differ?).to be_truthy
|
|
19
19
|
delta.migrate
|
|
20
|
-
expect(subject.dump).to
|
|
20
|
+
expect(subject.dump).to match_ruby expected_dsl
|
|
21
21
|
}
|
|
22
22
|
end
|
|
23
23
|
|
|
@@ -45,7 +45,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
|
45
45
|
delta = subject.diff(expected_dsl)
|
|
46
46
|
expect(delta.differ?).to be_falsey
|
|
47
47
|
delta.migrate
|
|
48
|
-
expect(subject.dump).to
|
|
48
|
+
expect(subject.dump).to match_ruby expected_dsl
|
|
49
49
|
}
|
|
50
50
|
end
|
|
51
51
|
end
|
|
@@ -28,9 +28,9 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
|
28
28
|
it {
|
|
29
29
|
delta = subject.diff(expected_dsl)
|
|
30
30
|
expect(delta.differ?).to be_truthy
|
|
31
|
-
expect(subject.dump).to
|
|
31
|
+
expect(subject.dump).to match_ruby actual_dsl
|
|
32
32
|
delta.migrate
|
|
33
|
-
expect(subject.dump).to
|
|
33
|
+
expect(subject.dump).to match_ruby expected_dsl
|
|
34
34
|
}
|
|
35
35
|
end
|
|
36
36
|
end
|
|
@@ -126,15 +126,15 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
|
126
126
|
it {
|
|
127
127
|
delta = subject.diff(expected_dsl)
|
|
128
128
|
expect(delta.differ?).to be_truthy
|
|
129
|
-
expect(subject.dump).to
|
|
129
|
+
expect(subject.dump).to match_ruby actual_dsl
|
|
130
130
|
delta.migrate
|
|
131
|
-
expect(subject.dump).to
|
|
131
|
+
expect(subject.dump).to match_ruby expected_dsl
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
it {
|
|
135
135
|
delta = client(:bulk_change => true).diff(expected_dsl)
|
|
136
136
|
expect(delta.differ?).to be_truthy
|
|
137
|
-
expect(subject.dump).to
|
|
137
|
+
expect(subject.dump).to match_ruby actual_dsl
|
|
138
138
|
expect(delta.script).to match_fuzzy <<-EOS
|
|
139
139
|
change_table("employee_clubs", {:bulk => true}) do |t|
|
|
140
140
|
t.change("club_id", :integer, {:null=>true, :default=>nil})
|
|
@@ -145,7 +145,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
|
145
145
|
end
|
|
146
146
|
EOS
|
|
147
147
|
delta.migrate
|
|
148
|
-
expect(subject.dump).to
|
|
148
|
+
expect(subject.dump).to match_ruby expected_dsl
|
|
149
149
|
}
|
|
150
150
|
end
|
|
151
151
|
|
|
@@ -128,15 +128,15 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
|
128
128
|
it {
|
|
129
129
|
delta = subject.diff(expected_dsl)
|
|
130
130
|
expect(delta.differ?).to be_truthy
|
|
131
|
-
expect(subject.dump).to
|
|
131
|
+
expect(subject.dump).to match_ruby actual_dsl
|
|
132
132
|
delta.migrate
|
|
133
|
-
expect(subject.dump).to
|
|
133
|
+
expect(subject.dump).to match_ruby expected_dsl
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
it {
|
|
137
137
|
delta = client(:bulk_change => true).diff(expected_dsl)
|
|
138
138
|
expect(delta.differ?).to be_truthy
|
|
139
|
-
expect(subject.dump).to
|
|
139
|
+
expect(subject.dump).to match_ruby actual_dsl
|
|
140
140
|
expect(delta.script).to match_fuzzy <<-EOS
|
|
141
141
|
change_table("dept_emp", {:bulk => true}) do |t|
|
|
142
142
|
t.remove_index({:name=>"idx_dept_emp_emp_no"})
|
|
@@ -51,9 +51,9 @@ describe 'Ridgepole::Client#diff -> migrate', condition: 5.1 do
|
|
|
51
51
|
|
|
52
52
|
delta = subject.diff(expected_dsl)
|
|
53
53
|
expect(delta.differ?).to be_truthy
|
|
54
|
-
expect(subject.dump).to
|
|
54
|
+
expect(subject.dump).to match_ruby actual_dsl
|
|
55
55
|
delta.migrate
|
|
56
|
-
expect(subject.dump).to
|
|
56
|
+
expect(subject.dump).to match_ruby expected_dsl
|
|
57
57
|
}
|
|
58
58
|
end
|
|
59
59
|
|
|
@@ -104,9 +104,9 @@ describe 'Ridgepole::Client#diff -> migrate', condition: 5.1 do
|
|
|
104
104
|
expect(Ridgepole::Logger.instance).to_not receive(:warn)
|
|
105
105
|
delta = subject.diff(expected_dsl)
|
|
106
106
|
expect(delta.differ?).to be_truthy
|
|
107
|
-
expect(subject.dump).to
|
|
107
|
+
expect(subject.dump).to match_ruby actual_dsl
|
|
108
108
|
delta.migrate
|
|
109
|
-
expect(subject.dump).to
|
|
109
|
+
expect(subject.dump).to match_ruby expected_dsl
|
|
110
110
|
}
|
|
111
111
|
end
|
|
112
112
|
end
|
|
@@ -110,9 +110,9 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
|
110
110
|
it {
|
|
111
111
|
delta = subject.diff(expected_dsl)
|
|
112
112
|
expect(delta.differ?).to be_truthy
|
|
113
|
-
expect(subject.dump).to
|
|
113
|
+
expect(subject.dump).to match_ruby actual_dsl
|
|
114
114
|
delta.migrate
|
|
115
|
-
expect(subject.dump).to
|
|
115
|
+
expect(subject.dump).to match_ruby expected_dsl
|
|
116
116
|
}
|
|
117
117
|
end
|
|
118
118
|
end
|
|
@@ -22,9 +22,9 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
|
22
22
|
|
|
23
23
|
delta = subject.diff(expected_dsl)
|
|
24
24
|
expect(delta.differ?).to be_truthy
|
|
25
|
-
expect(subject.dump).to
|
|
25
|
+
expect(subject.dump).to match_ruby actual_dsl
|
|
26
26
|
delta.migrate
|
|
27
|
-
expect(subject.dump).to
|
|
27
|
+
expect(subject.dump).to match_ruby expected_dsl
|
|
28
28
|
}
|
|
29
29
|
end
|
|
30
30
|
|
|
@@ -47,9 +47,9 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
|
47
47
|
|
|
48
48
|
delta = subject.diff(dsl)
|
|
49
49
|
expect(delta.differ?).to be_falsey
|
|
50
|
-
expect(subject.dump).to
|
|
50
|
+
expect(subject.dump).to match_ruby dsl
|
|
51
51
|
delta.migrate
|
|
52
|
-
expect(subject.dump).to
|
|
52
|
+
expect(subject.dump).to match_ruby dsl
|
|
53
53
|
}
|
|
54
54
|
end
|
|
55
55
|
|
|
@@ -89,9 +89,9 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
|
89
89
|
|
|
90
90
|
delta = subject.diff(expected_dsl)
|
|
91
91
|
expect(delta.differ?).to be_falsey
|
|
92
|
-
expect(subject.dump).to
|
|
92
|
+
expect(subject.dump).to match_ruby actual_dsl
|
|
93
93
|
delta.migrate
|
|
94
|
-
expect(subject.dump).to
|
|
94
|
+
expect(subject.dump).to match_ruby actual_dsl
|
|
95
95
|
}
|
|
96
96
|
end
|
|
97
97
|
|
|
@@ -101,9 +101,9 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
|
101
101
|
it {
|
|
102
102
|
delta = subject.diff(expected_dsl)
|
|
103
103
|
expect(delta.differ?).to be_truthy
|
|
104
|
-
expect(subject.dump).to
|
|
104
|
+
expect(subject.dump).to match_ruby actual_dsl
|
|
105
105
|
delta.migrate
|
|
106
|
-
expect(subject.dump).to
|
|
106
|
+
expect(subject.dump).to match_ruby expected_dsl
|
|
107
107
|
}
|
|
108
108
|
end
|
|
109
109
|
end
|
|
@@ -122,15 +122,15 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
|
122
122
|
it {
|
|
123
123
|
delta = subject.diff(expected_dsl)
|
|
124
124
|
expect(delta.differ?).to be_truthy
|
|
125
|
-
expect(subject.dump).to
|
|
125
|
+
expect(subject.dump).to match_ruby actual_dsl
|
|
126
126
|
delta.migrate
|
|
127
|
-
expect(subject.dump).to
|
|
127
|
+
expect(subject.dump).to match_ruby expected_dsl
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
it {
|
|
131
131
|
delta = client(:bulk_change => true).diff(expected_dsl)
|
|
132
132
|
expect(delta.differ?).to be_truthy
|
|
133
|
-
expect(subject.dump).to
|
|
133
|
+
expect(subject.dump).to match_ruby actual_dsl
|
|
134
134
|
expect(delta.script).to match_fuzzy <<-EOS
|
|
135
135
|
change_table("dept_emp", {:bulk => true}) do |t|
|
|
136
136
|
t.remove("from_date")
|
|
@@ -148,7 +148,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
|
148
148
|
end
|
|
149
149
|
EOS
|
|
150
150
|
delta.migrate
|
|
151
|
-
expect(subject.dump).to
|
|
151
|
+
expect(subject.dump).to match_ruby expected_dsl
|
|
152
152
|
}
|
|
153
153
|
end
|
|
154
154
|
end
|
|
@@ -117,23 +117,23 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
|
117
117
|
it {
|
|
118
118
|
delta = subject.diff(expected_dsl)
|
|
119
119
|
expect(delta.differ?).to be_truthy
|
|
120
|
-
expect(subject.dump).to
|
|
120
|
+
expect(subject.dump).to match_ruby actual_dsl
|
|
121
121
|
delta.migrate
|
|
122
|
-
expect(subject.dump).to
|
|
122
|
+
expect(subject.dump).to match_ruby expected_dsl
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
it {
|
|
126
126
|
delta = subject.diff(expected_dsl)
|
|
127
127
|
expect(delta.differ?).to be_truthy
|
|
128
|
-
expect(subject.dump).to
|
|
128
|
+
expect(subject.dump).to match_ruby actual_dsl
|
|
129
129
|
delta.migrate(:noop => true)
|
|
130
|
-
expect(subject.dump).to
|
|
130
|
+
expect(subject.dump).to match_ruby actual_dsl
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
it {
|
|
134
134
|
delta = client(:bulk_change => true).diff(expected_dsl)
|
|
135
135
|
expect(delta.differ?).to be_truthy
|
|
136
|
-
expect(subject.dump).to
|
|
136
|
+
expect(subject.dump).to match_ruby actual_dsl
|
|
137
137
|
expect(delta.script).to match_fuzzy erbh(<<-EOS)
|
|
138
138
|
change_table("dept_emp", {:bulk => true}) do |t|
|
|
139
139
|
t.remove("emp_no")
|
|
@@ -158,7 +158,7 @@ change_table("employees", {:bulk => true}) do |t|
|
|
|
158
158
|
end
|
|
159
159
|
EOS
|
|
160
160
|
delta.migrate
|
|
161
|
-
expect(subject.dump).to
|
|
161
|
+
expect(subject.dump).to match_ruby expected_dsl
|
|
162
162
|
}
|
|
163
163
|
end
|
|
164
164
|
end
|
|
@@ -127,15 +127,15 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
|
127
127
|
it {
|
|
128
128
|
delta = subject.diff(expected_dsl)
|
|
129
129
|
expect(delta.differ?).to be_truthy
|
|
130
|
-
expect(subject.dump).to
|
|
130
|
+
expect(subject.dump).to match_ruby actual_dsl
|
|
131
131
|
delta.migrate
|
|
132
|
-
expect(subject.dump).to
|
|
132
|
+
expect(subject.dump).to match_ruby expected_dsl
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
it {
|
|
136
136
|
delta = client(:bulk_change => true).diff(expected_dsl)
|
|
137
137
|
expect(delta.differ?).to be_truthy
|
|
138
|
-
expect(subject.dump).to
|
|
138
|
+
expect(subject.dump).to match_ruby actual_dsl
|
|
139
139
|
expect(delta.script).to match_fuzzy <<-EOS
|
|
140
140
|
change_table("clubs", {:bulk => true}) do |t|
|
|
141
141
|
t.remove_index({:name=>"idx_name"})
|
|
@@ -150,7 +150,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
|
150
150
|
end
|
|
151
151
|
EOS
|
|
152
152
|
delta.migrate
|
|
153
|
-
expect(subject.dump).to
|
|
153
|
+
expect(subject.dump).to match_ruby expected_dsl
|
|
154
154
|
}
|
|
155
155
|
end
|
|
156
156
|
end
|
|
@@ -112,9 +112,9 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
|
112
112
|
it {
|
|
113
113
|
delta = subject.diff(expected_dsl)
|
|
114
114
|
expect(delta.differ?).to be_truthy
|
|
115
|
-
expect(subject.dump).to
|
|
115
|
+
expect(subject.dump).to match_ruby actual_dsl
|
|
116
116
|
delta.migrate
|
|
117
|
-
expect(subject.dump).to
|
|
117
|
+
expect(subject.dump).to match_ruby expected_dsl
|
|
118
118
|
}
|
|
119
119
|
end
|
|
120
120
|
end
|