ridgepole 0.7.8 → 0.8.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +1 -1
- data/.rubocop.yml +1 -3
- data/.travis.yml +11 -3
- data/Appraisals +4 -2
- data/Gemfile +0 -2
- data/README.md +3 -4
- data/Rakefile +0 -2
- data/bin/ridgepole +2 -4
- data/gemfiles/activerecord_6.0.gemfile +7 -0
- data/lib/ridgepole.rb +0 -2
- data/lib/ridgepole/cli/config.rb +0 -2
- data/lib/ridgepole/client.rb +0 -2
- data/lib/ridgepole/connection_adapters.rb +0 -2
- data/lib/ridgepole/default_limit.rb +0 -2
- data/lib/ridgepole/delta.rb +1 -3
- data/lib/ridgepole/diff.rb +2 -4
- data/lib/ridgepole/dsl_parser.rb +0 -2
- data/lib/ridgepole/dsl_parser/context.rb +3 -5
- data/lib/ridgepole/dsl_parser/table_definition.rb +0 -2
- data/lib/ridgepole/dumper.rb +0 -2
- data/lib/ridgepole/execute_expander.rb +2 -4
- data/lib/ridgepole/ext/abstract_adapter/disable_table_options.rb +0 -2
- data/lib/ridgepole/ext/abstract_mysql_adapter/dump_auto_increment.rb +0 -2
- data/lib/ridgepole/ext/abstract_mysql_adapter/use_alter_index.rb +0 -2
- data/lib/ridgepole/ext/pp_sort_hash.rb +0 -2
- data/lib/ridgepole/ext/schema_dumper.rb +0 -2
- data/lib/ridgepole/external_sql_executer.rb +0 -2
- data/lib/ridgepole/logger.rb +0 -2
- data/lib/ridgepole/migration_ext.rb +0 -2
- data/lib/ridgepole/schema_dumper_ext.rb +0 -2
- data/lib/ridgepole/schema_statements_ext.rb +0 -2
- data/lib/ridgepole/version.rb +1 -3
- data/ridgepole.gemspec +0 -2
- data/spec/cli_helper.rb +0 -2
- data/spec/erb_helper.rb +0 -2
- data/spec/hide_pending_formatter.rb +0 -2
- data/spec/mysql/_migrate/migrate_change_table_option_spec.rb +3 -5
- data/spec/mysql/bigint_pk/bigint_pk_spec.rb +0 -2
- data/spec/mysql/bigint_pk/int_pk_spec.rb +0 -2
- data/spec/mysql/cli/config_spec.rb +0 -2
- data/spec/mysql/cli/ridgepole_spec.rb +0 -2
- data/spec/mysql/collation/collation_spec.rb +0 -2
- data/spec/mysql/comment/comment_spec.rb +0 -2
- data/spec/mysql/default_lambda/default_lambda_spec.rb +0 -2
- data/spec/mysql/diff/diff2_spec.rb +0 -2
- data/spec/mysql/diff/diff_spec.rb +0 -2
- data/spec/mysql/dump/dump_class_method_spec.rb +0 -2
- data/spec/mysql/dump/dump_some_tables_spec.rb +0 -2
- data/spec/mysql/dump/dump_spec.rb +0 -2
- data/spec/mysql/dump/dump_unknown_column_type_spec.rb +0 -2
- data/spec/mysql/dump/dump_without_table_options_spec.rb +0 -2
- data/spec/mysql/fk/migrate_change_fk2_spec.rb +0 -2
- data/spec/mysql/fk/migrate_change_fk_spec.rb +0 -2
- data/spec/mysql/fk/migrate_create_fk_spec.rb +0 -2
- data/spec/mysql/fk/migrate_drop_fk_spec.rb +0 -2
- data/spec/mysql/fk/migrate_ignore_fk_spec.rb +0 -2
- data/spec/mysql/migrate/check_orphan_index_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_add_column2_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_add_column_order_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_add_column_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_add_column_with_alter_extra_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_add_column_with_script_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_change_column2_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_change_column3_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_change_column4_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_change_column5_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_change_column6_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_change_column7_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_change_column8_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_change_column_default_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_change_column_float_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_change_column_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_change_index2_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_change_index3_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_change_index4_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_change_index5_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_change_index6_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_change_index7_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_change_index8_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_change_index_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_change_table_comment_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_change_table_option_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_check_relation_column_type_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_create_index2_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_create_index_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_create_table_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_create_table_with_ignore_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_create_table_with_index_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_create_table_with_options_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_create_table_with_script_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_drop_column_and_index2_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_drop_column_and_index_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_drop_column_and_unique_index_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_drop_column_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_drop_index_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_drop_table_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_duplicate_index_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_duplicate_table_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_empty_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_execute_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_ignore_column_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_ignore_index_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_log_file_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_merge_mode_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_noop_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_primary_key_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_rename_column_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_rename_table_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_same_default_null_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_same_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_script_error_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_skip_column_comment_change_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_skip_drop_table_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_skip_rename_column_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_skip_rename_table_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_with_ignore_tables_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_with_pre_post_query_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_with_tables_spec.rb +0 -2
- data/spec/mysql/migrate/migrate_with_verbose_log_spec.rb +0 -2
- data/spec/mysql/migrate_/migrate_create_index_with_alter_spec.rb +0 -2
- data/spec/mysql/migrate_/migrate_drop_index_with_alter_spec.rb +0 -2
- data/spec/mysql/text_blob_types/text_blob_types_spec.rb +50 -10
- data/spec/mysql/~default_name_fk/migrate_change_fk_spec.rb +0 -2
- data/spec/mysql/~default_name_fk/migrate_create_fk_spec.rb +0 -2
- data/spec/mysql/~default_name_fk/migrate_drop_fk_spec.rb +0 -2
- data/spec/mysql/~dump_auto_increment/migrate_create_table_with_index_spec.rb +0 -2
- data/spec/mysql57/json/add_json_column_spec.rb +0 -2
- data/spec/mysql57/json/change_json_column_spec.rb +0 -2
- data/spec/mysql57/json/drop_json_column_spec.rb +0 -2
- data/spec/mysql57/virtual/add_virtual_column_spec.rb +0 -2
- data/spec/mysql57/virtual/change_virtual_column_spec.rb +0 -2
- data/spec/mysql57/virtual/drop_virtual_column_spec.rb +0 -2
- data/spec/postgresql/diff/diff_spec.rb +0 -2
- data/spec/postgresql/dump/dump_spec.rb +0 -2
- data/spec/postgresql/fk/migrate_change_fk_spec.rb +0 -2
- data/spec/postgresql/fk/migrate_create_fk_spec.rb +0 -2
- data/spec/postgresql/fk/migrate_drop_fk_spec.rb +0 -2
- data/spec/postgresql/migrate/migrate_add_column_spec.rb +0 -2
- data/spec/postgresql/migrate/migrate_add_expression_index_spec.rb +0 -2
- data/spec/postgresql/migrate/migrate_bigint_spec.rb +0 -2
- data/spec/postgresql/migrate/migrate_change_column_default_spec.rb +0 -2
- data/spec/postgresql/migrate/migrate_change_column_spec.rb +0 -2
- data/spec/postgresql/migrate/migrate_change_index_spec.rb +0 -2
- data/spec/postgresql/migrate/migrate_check_relation_column_type_spec.rb +0 -2
- data/spec/postgresql/migrate/migrate_create_table_spec.rb +0 -2
- data/spec/postgresql/migrate/migrate_create_table_with_default_proc_spec.rb +0 -2
- data/spec/postgresql/migrate/migrate_drop_column_spec.rb +0 -2
- data/spec/postgresql/migrate/migrate_drop_column_with_index_spec.rb +0 -2
- data/spec/postgresql/migrate/migrate_drop_expression_index_spec.rb +0 -2
- data/spec/postgresql/migrate/migrate_drop_index_spec.rb +0 -2
- data/spec/postgresql/migrate/migrate_drop_table_spec.rb +0 -2
- data/spec/postgresql/migrate/migrate_ext_cols_spec.rb +0 -2
- data/spec/postgresql/migrate/migrate_primary_key2_spec.rb +0 -2
- data/spec/postgresql/migrate/migrate_primary_key_spec.rb +0 -2
- data/spec/postgresql/migrate/migrate_references_spec.rb +0 -2
- data/spec/postgresql/migrate/migrate_rename_column_spec.rb +0 -2
- data/spec/postgresql/migrate/migrate_rename_table_spec.rb +0 -2
- data/spec/postgresql/migrate/migrate_same_spec.rb +0 -2
- data/spec/postgresql/~default_name_fk/migrate_change_fk_spec.rb +0 -2
- data/spec/postgresql/~default_name_fk/migrate_create_fk_spec.rb +0 -2
- data/spec/postgresql/~default_name_fk/migrate_drop_fk_spec.rb +0 -2
- data/spec/processing_for_travis.rb +0 -2
- data/spec/spec_condition.rb +0 -2
- data/spec/spec_const.rb +7 -9
- data/spec/spec_helper.rb +0 -2
- metadata +6 -7
- data/spec/mysql/fk/migrate_fk_with_column_spec.rb +0 -163
@@ -1,5 +1,3 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
1
|
describe 'Ridgepole::Client (with new text/blob types)' do
|
4
2
|
context 'when use new types' do
|
5
3
|
subject { client }
|
@@ -24,15 +22,15 @@ describe 'Ridgepole::Client (with new text/blob types)' do
|
|
24
22
|
expect(delta.differ?).to be_truthy
|
25
23
|
delta.migrate
|
26
24
|
|
27
|
-
expect(subject.dump).to
|
25
|
+
expect(subject.dump).to match_ruby erbh(<<-ERB)
|
28
26
|
create_table "foos", id: :integer, unsigned: true, force: :cascade do |t|
|
29
27
|
t.binary "blob", <%= i cond(5.0, limit: 65535) %>
|
30
|
-
t.blob
|
31
|
-
t.binary "medium_blob", limit: 16777215
|
32
|
-
t.binary "long_blob", limit: 4294967295
|
33
|
-
t.text "tiny_text", limit: 255
|
34
|
-
t.text "medium_text", limit: 16777215
|
35
|
-
t.text "long_text", limit: 4294967295
|
28
|
+
t.<%= cond('< 6.0.0.beta2', :blob, :binary) %> "tiny_blob", <%= i cond('< 6.0.0.beta2', {limit: 255}, {size: :tiny}) %>
|
29
|
+
t.binary "medium_blob", <%= i cond('< 6.0.0.beta2', {limit: 16777215}, {size: :medium}) %>
|
30
|
+
t.binary "long_blob", <%= i cond('< 6.0.0.beta2', {limit: 4294967295}, {size: :long}) %>
|
31
|
+
t.text "tiny_text", <%= i cond('< 6.0.0.beta2', {limit: 255}, {size: :tiny}) %>
|
32
|
+
t.text "medium_text", <%= i cond('< 6.0.0.beta2', {limit: 16777215}, {size: :medium}) %>
|
33
|
+
t.text "long_text", <%= i cond('< 6.0.0.beta2', {limit: 4294967295}, {size: :long}) %>
|
36
34
|
t.decimal "unsigned_decimal", precision: 10, unsigned: true
|
37
35
|
t.float "unsigned_float", <%= i cond('< 5.2.0.beta2', limit: 24) %>, unsigned: true
|
38
36
|
t.bigint "unsigned_bigint", unsigned: true
|
@@ -42,7 +40,7 @@ describe 'Ridgepole::Client (with new text/blob types)' do
|
|
42
40
|
end
|
43
41
|
end
|
44
42
|
|
45
|
-
context 'when compare new types' do
|
43
|
+
context 'when compare new types', condition: '< 6.0.0.beta2' do
|
46
44
|
subject { client }
|
47
45
|
|
48
46
|
before do
|
@@ -83,4 +81,46 @@ describe 'Ridgepole::Client (with new text/blob types)' do
|
|
83
81
|
expect(delta.differ?).to be_falsey
|
84
82
|
end
|
85
83
|
end
|
84
|
+
|
85
|
+
context 'when compare new types', condition: '>= 6.0.0.beta2' do
|
86
|
+
subject { client }
|
87
|
+
|
88
|
+
before do
|
89
|
+
subject.diff(<<-RUBY).migrate
|
90
|
+
create_table "foos", force: :cascade do |t|
|
91
|
+
t.binary "blob"
|
92
|
+
t.binary "tiny_blob", size: :tiny
|
93
|
+
t.binary "medium_blob", size: :medium
|
94
|
+
t.binary "long_blob", size: :long
|
95
|
+
t.text "tiny_text", size: :tiny
|
96
|
+
t.text "medium_text", size: :medium
|
97
|
+
t.text "long_text", size: :long
|
98
|
+
t.decimal "unsigned_decimal", precision: 10, unsigned: true
|
99
|
+
t.float "unsigned_float", unsigned: true
|
100
|
+
t.bigint "unsigned_bigint", unsigned: true
|
101
|
+
t.integer "unsigned_integer", unsigned: true
|
102
|
+
end
|
103
|
+
RUBY
|
104
|
+
end
|
105
|
+
|
106
|
+
it do
|
107
|
+
delta = subject.diff(<<-RUBY)
|
108
|
+
create_table "foos", force: :cascade do |t|
|
109
|
+
t.binary "blob"
|
110
|
+
t.binary "tiny_blob", size: :tiny
|
111
|
+
t.binary "medium_blob", size: :medium
|
112
|
+
t.binary "long_blob", size: :long
|
113
|
+
t.text "tiny_text", size: :tiny
|
114
|
+
t.text "medium_text", size: :medium
|
115
|
+
t.text "long_text", size: :long
|
116
|
+
t.decimal "unsigned_decimal", precision: 10, unsigned: true
|
117
|
+
t.float "unsigned_float", unsigned: true
|
118
|
+
t.bigint "unsigned_bigint", unsigned: true
|
119
|
+
t.integer "unsigned_integer", unsigned: true
|
120
|
+
end
|
121
|
+
RUBY
|
122
|
+
|
123
|
+
expect(delta.differ?).to be_falsey
|
124
|
+
end
|
125
|
+
end
|
86
126
|
end
|