ridgepole 0.8.9 → 0.9.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (143) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test.yml +83 -0
  3. data/.rubocop.yml +9 -34
  4. data/.simplecov +6 -0
  5. data/Appraisals +4 -5
  6. data/README.md +25 -40
  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/default_limit.rb +1 -1
  11. data/lib/ridgepole/delta.rb +16 -1
  12. data/lib/ridgepole/diff.rb +50 -31
  13. data/lib/ridgepole/dsl_parser.rb +3 -5
  14. data/lib/ridgepole/dsl_parser/context.rb +1 -1
  15. data/lib/ridgepole/dsl_parser/table_definition.rb +52 -42
  16. data/lib/ridgepole/execute_expander.rb +10 -1
  17. data/lib/ridgepole/ext/abstract_adapter/disable_table_options.rb +9 -1
  18. data/lib/ridgepole/external_sql_executer.rb +12 -1
  19. data/lib/ridgepole/version.rb +1 -1
  20. data/ridgepole.gemspec +7 -4
  21. data/spec/erb_helper.rb +5 -5
  22. data/spec/mysql/_migrate/migrate_change_table_option_spec.rb +2 -2
  23. data/spec/mysql/bigint_pk/int_pk_spec.rb +1 -1
  24. data/spec/mysql/cli/ridgepole_spec.rb +35 -1
  25. data/spec/mysql/collation/collation_spec.rb +15 -15
  26. data/spec/mysql/comment/comment_spec.rb +9 -9
  27. data/spec/mysql/diff/diff2_spec.rb +5 -5
  28. data/spec/mysql/diff/diff_spec.rb +3 -3
  29. data/spec/mysql/dump/dump_class_method_spec.rb +13 -13
  30. data/spec/mysql/dump/dump_some_tables_spec.rb +4 -4
  31. data/spec/mysql/dump/dump_spec.rb +13 -13
  32. data/spec/mysql/dump/dump_unknown_column_type_spec.rb +2 -2
  33. data/spec/mysql/dump/dump_without_table_options_spec.rb +2 -2
  34. data/spec/mysql/fk/migrate_change_fk2_spec.rb +2 -2
  35. data/spec/mysql/fk/migrate_change_fk_spec.rb +20 -20
  36. data/spec/mysql/fk/migrate_create_fk_spec.rb +73 -24
  37. data/spec/mysql/fk/migrate_drop_fk_spec.rb +26 -26
  38. data/spec/mysql/fk/migrate_fk_with_column_spec.rb +16 -16
  39. data/spec/mysql/fk/migrate_ignore_fk_spec.rb +6 -6
  40. data/spec/mysql/migrate/migrate_add_column_order_spec.rb +2 -2
  41. data/spec/mysql/migrate/migrate_add_column_spec.rb +18 -18
  42. data/spec/mysql/migrate/migrate_add_column_with_alter_extra_spec.rb +106 -18
  43. data/spec/mysql/migrate/migrate_add_column_with_script_spec.rb +18 -18
  44. data/spec/mysql/migrate/migrate_change_column2_spec.rb +5 -5
  45. data/spec/mysql/migrate/migrate_change_column3_spec.rb +116 -25
  46. data/spec/mysql/migrate/migrate_change_column5_spec.rb +3 -3
  47. data/spec/mysql/migrate/migrate_change_column6_spec.rb +7 -7
  48. data/spec/mysql/migrate/migrate_change_column8_spec.rb +38 -5
  49. data/spec/mysql/migrate/migrate_change_column_default_spec.rb +2 -14
  50. data/spec/mysql/migrate/migrate_change_column_spec.rb +21 -21
  51. data/spec/mysql/migrate/migrate_change_index2_spec.rb +5 -5
  52. data/spec/mysql/migrate/migrate_change_index3_spec.rb +7 -7
  53. data/spec/mysql/migrate/migrate_change_index4_spec.rb +6 -6
  54. data/spec/mysql/migrate/migrate_change_index5_spec.rb +4 -4
  55. data/spec/mysql/migrate/migrate_change_index6_spec.rb +27 -27
  56. data/spec/mysql/migrate/migrate_change_index7_spec.rb +4 -4
  57. data/spec/mysql/migrate/migrate_change_index8_spec.rb +4 -4
  58. data/spec/mysql/migrate/migrate_change_index_spec.rb +34 -28
  59. data/spec/mysql/migrate/migrate_check_relation_column_type_spec.rb +5 -5
  60. data/spec/mysql/migrate/migrate_create_index2_spec.rb +24 -24
  61. data/spec/mysql/migrate/migrate_create_index_spec.rb +18 -18
  62. data/spec/mysql/migrate/migrate_create_table_spec.rb +16 -16
  63. data/spec/mysql/migrate/migrate_create_table_with_ignore_spec.rb +4 -4
  64. data/spec/mysql/migrate/migrate_create_table_with_index_spec.rb +4 -4
  65. data/spec/mysql/migrate/migrate_create_table_with_script_spec.rb +16 -16
  66. data/spec/mysql/migrate/migrate_drop_column_and_index2_spec.rb +18 -18
  67. data/spec/mysql/migrate/migrate_drop_column_and_index_spec.rb +16 -16
  68. data/spec/mysql/migrate/migrate_drop_column_and_unique_index_spec.rb +1 -1
  69. data/spec/mysql/migrate/migrate_drop_column_spec.rb +18 -18
  70. data/spec/mysql/migrate/migrate_drop_index_spec.rb +15 -15
  71. data/spec/mysql/migrate/migrate_drop_table_spec.rb +16 -16
  72. data/spec/mysql/migrate/migrate_empty_spec.rb +9 -9
  73. data/spec/mysql/migrate/migrate_execute_spec.rb +32 -32
  74. data/spec/mysql/migrate/migrate_ignore_column_spec.rb +4 -4
  75. data/spec/mysql/migrate/migrate_ignore_index_spec.rb +5 -5
  76. data/spec/mysql/migrate/migrate_log_file_spec.rb +16 -16
  77. data/spec/mysql/migrate/migrate_merge_mode_spec.rb +18 -18
  78. data/spec/mysql/migrate/migrate_noop_spec.rb +12 -12
  79. data/spec/mysql/migrate/migrate_primary_key_spec.rb +31 -6
  80. data/spec/mysql/migrate/migrate_rename_column_spec.rb +18 -18
  81. data/spec/mysql/migrate/migrate_rename_table_spec.rb +22 -22
  82. data/spec/mysql/migrate/migrate_same_spec.rb +13 -13
  83. data/spec/mysql/migrate/migrate_skip_column_comment_change_spec.rb +2 -2
  84. data/spec/mysql/migrate/migrate_skip_drop_table_spec.rb +18 -18
  85. data/spec/mysql/migrate/migrate_skip_rename_column_spec.rb +18 -18
  86. data/spec/mysql/migrate/migrate_skip_rename_table_spec.rb +18 -18
  87. data/spec/mysql/migrate/migrate_with_pre_post_query_spec.rb +18 -18
  88. data/spec/mysql/text_blob_types/text_blob_types_spec.rb +2 -2
  89. data/spec/mysql/~default_name_fk/migrate_change_fk_spec.rb +6 -6
  90. data/spec/mysql/~default_name_fk/migrate_create_fk_spec.rb +9 -9
  91. data/spec/mysql/~default_name_fk/migrate_drop_fk_spec.rb +8 -8
  92. data/spec/mysql/~dump_auto_increment/migrate_create_table_with_index_spec.rb +5 -5
  93. data/spec/mysql57/json/add_json_column_spec.rb +2 -2
  94. data/spec/mysql57/json/change_json_column_spec.rb +6 -6
  95. data/spec/mysql57/json/drop_json_column_spec.rb +2 -2
  96. data/spec/mysql57/virtual/add_virtual_column_spec.rb +1 -1
  97. data/spec/mysql57/virtual/change_virtual_column_spec.rb +1 -1
  98. data/spec/mysql57/virtual/drop_virtual_column_spec.rb +1 -1
  99. data/spec/postgresql/dump/dump_spec.rb +13 -13
  100. data/spec/postgresql/fk/migrate_change_fk_spec.rb +6 -6
  101. data/spec/postgresql/fk/migrate_create_fk_spec.rb +5 -5
  102. data/spec/postgresql/fk/migrate_drop_fk_spec.rb +8 -8
  103. data/spec/postgresql/migrate/migrate_add_column_spec.rb +27 -20
  104. data/spec/postgresql/migrate/migrate_add_expression_index_spec.rb +1 -1
  105. data/spec/postgresql/migrate/migrate_change_column_spec.rb +20 -16
  106. data/spec/postgresql/migrate/migrate_change_index_spec.rb +18 -18
  107. data/spec/postgresql/migrate/migrate_check_relation_column_type_spec.rb +1 -1
  108. data/spec/postgresql/migrate/migrate_create_table_spec.rb +14 -14
  109. data/spec/postgresql/migrate/migrate_drop_column_spec.rb +29 -22
  110. data/spec/postgresql/migrate/migrate_drop_column_with_index_spec.rb +17 -17
  111. data/spec/postgresql/migrate/migrate_drop_expression_index_spec.rb +3 -3
  112. data/spec/postgresql/migrate/migrate_drop_index_spec.rb +15 -15
  113. data/spec/postgresql/migrate/migrate_drop_table_spec.rb +16 -16
  114. data/spec/postgresql/migrate/migrate_primary_key2_spec.rb +1 -1
  115. data/spec/postgresql/migrate/migrate_primary_key_spec.rb +1 -1
  116. data/spec/postgresql/migrate/migrate_references_spec.rb +6 -6
  117. data/spec/postgresql/migrate/migrate_rename_column_spec.rb +18 -18
  118. data/spec/postgresql/migrate/migrate_rename_table_spec.rb +20 -20
  119. data/spec/postgresql/migrate/migrate_same_spec.rb +13 -13
  120. data/spec/postgresql/~default_name_fk/migrate_change_fk_spec.rb +3 -3
  121. data/spec/postgresql/~default_name_fk/migrate_create_fk_spec.rb +4 -4
  122. data/spec/postgresql/~default_name_fk/migrate_drop_fk_spec.rb +4 -4
  123. data/spec/processing_for_ci.rb +13 -0
  124. data/spec/spec_condition.rb +4 -0
  125. data/spec/spec_helper.rb +3 -2
  126. metadata +74 -49
  127. data/.travis.yml +0 -45
  128. data/lib/ridgepole/ext/abstract_mysql_adapter/use_alter_index.rb +0 -31
  129. data/omnibus-ridgepole/.gitignore +0 -10
  130. data/omnibus-ridgepole/Dockerfile.centos +0 -25
  131. data/omnibus-ridgepole/Dockerfile.ubuntu +0 -21
  132. data/omnibus-ridgepole/Gemfile +0 -24
  133. data/omnibus-ridgepole/README.md +0 -15
  134. data/omnibus-ridgepole/Rakefile +0 -38
  135. data/omnibus-ridgepole/config/projects/ridgepole.rb +0 -27
  136. data/omnibus-ridgepole/config/software/ridgepole.rb +0 -13
  137. data/omnibus-ridgepole/omnibus.rb +0 -54
  138. data/omnibus-ridgepole/package-scripts/ridgepole/postinst +0 -1
  139. data/omnibus-ridgepole/package-scripts/ridgepole/postrm +0 -1
  140. data/spec/mysql/bigint_pk/bigint_pk_spec.rb +0 -47
  141. data/spec/mysql/migrate_/migrate_create_index_with_alter_spec.rb +0 -141
  142. data/spec/mysql/migrate_/migrate_drop_index_with_alter_spec.rb +0 -141
  143. data/spec/processing_for_travis.rb +0 -11
@@ -6,12 +6,12 @@ describe 'Ridgepole::Client#diff -> migrate' do
6
6
  erbh(<<-ERB)
7
7
  create_table "clubs", force: :cascade do |t|
8
8
  t.string "name", 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
12
  create_table "departments", primary_key: "dept_no", force: :cascade do |t|
13
13
  t.string "dept_name", limit: 40, null: false
14
- t.index ["dept_name"], name: "dept_name", unique: true, <%= i cond(5.0, using: :btree) %>
14
+ t.index ["dept_name"], name: "dept_name", unique: true
15
15
  end
16
16
 
17
17
  create_table "dept_emp", id: false, force: :cascade do |t|
@@ -19,8 +19,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
19
19
  t.string "dept_no", null: false
20
20
  t.date "from_date", null: false
21
21
  t.date "to_date", null: false
22
- t.index ["dept_no"], name: "dept_no", <%= i cond(5.0, using: :btree) %>
23
- t.index ["emp_no"], name: "emp_no", <%= i cond(5.0, using: :btree) %>
22
+ t.index ["dept_no"], name: "dept_no"
23
+ t.index ["emp_no"], name: "emp_no"
24
24
  end
25
25
 
26
26
  create_table "dept_manager", id: false, force: :cascade do |t|
@@ -28,14 +28,14 @@ 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: "dept_no", <%= i cond(5.0, using: :btree) %>
32
- t.index ["emp_no"], name: "emp_no", <%= i cond(5.0, using: :btree) %>
31
+ t.index ["dept_no"], name: "dept_no"
32
+ t.index ["emp_no"], name: "emp_no"
33
33
  end
34
34
 
35
35
  create_table "employee_clubs", 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_emp_no_club_id", <%= i cond(5.0, using: :btree) %>
38
+ t.index ["emp_no", "club_id"], name: "idx_emp_no_club_id"
39
39
  end
40
40
 
41
41
  create_table "employees", primary_key: "emp_no", force: :cascade do |t|
@@ -51,7 +51,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
51
51
  t.integer "salary", null: false
52
52
  t.date "from_date", null: false
53
53
  t.date "to_date", null: false
54
- t.index ["emp_no"], name: "emp_no", <%= i cond(5.0, using: :btree) %>
54
+ t.index ["emp_no"], name: "emp_no"
55
55
  end
56
56
 
57
57
  create_table "titles", id: false, force: :cascade do |t|
@@ -59,7 +59,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
59
59
  t.string "title", limit: 50, null: false
60
60
  t.date "from_date", null: false
61
61
  t.date "to_date"
62
- t.index ["emp_no"], name: "emp_no", <%= i cond(5.0, using: :btree) %>
62
+ t.index ["emp_no"], name: "emp_no"
63
63
  end
64
64
  ERB
65
65
  end
@@ -68,27 +68,27 @@ describe 'Ridgepole::Client#diff -> migrate' do
68
68
  erbh(<<-ERB)
69
69
  create_table "clubs", force: :cascade do |t|
70
70
  t.string "name", default: "", null: false
71
- t.index ["name"], name: "idx_name", unique: true, <%= i cond(5.0, using: :btree) %>
71
+ t.index ["name"], name: "idx_name", unique: true
72
72
  end
73
73
 
74
74
  create_table "departments", primary_key: "dept_no", force: :cascade do |t|
75
75
  t.string "dept_name", limit: 40, null: false
76
- t.index ["dept_name"], name: "dept_name", unique: true, <%= i cond(5.0, using: :btree) %>
76
+ t.index ["dept_name"], name: "dept_name", unique: true
77
77
  end
78
78
 
79
79
  create_table "dept_emp", id: false, force: :cascade do |t|
80
80
  t.string "dept_no", null: false
81
- t.index ["dept_no"], name: "dept_no", <%= i cond(5.0, using: :btree) %>
81
+ t.index ["dept_no"], name: "dept_no"
82
82
  end
83
83
 
84
84
  create_table "dept_manager", id: false, force: :cascade do |t|
85
85
  t.string "dept_no", null: false
86
- t.index ["dept_no"], name: "dept_no", <%= i cond(5.0, using: :btree) %>
86
+ t.index ["dept_no"], name: "dept_no"
87
87
  end
88
88
 
89
89
  create_table "employee_clubs", force: :cascade do |t|
90
90
  t.integer "emp_no", null: false
91
- t.index ["emp_no"], name: "idx_emp_no_club_id", <%= i cond(5.0, using: :btree) %>
91
+ t.index ["emp_no"], name: "idx_emp_no_club_id"
92
92
  end
93
93
 
94
94
  create_table "employees", primary_key: "emp_no", force: :cascade do |t|
@@ -101,7 +101,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
101
101
  t.integer "salary", null: false
102
102
  t.date "from_date", null: false
103
103
  t.date "to_date", null: false
104
- t.index ["emp_no"], name: "emp_no", <%= i cond(5.0, using: :btree) %>
104
+ t.index ["emp_no"], name: "emp_no"
105
105
  end
106
106
 
107
107
  create_table "titles", id: false, force: :cascade do |t|
@@ -109,7 +109,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
109
109
  t.string "title", limit: 50, null: false
110
110
  t.date "from_date", null: false
111
111
  t.date "to_date"
112
- t.index ["emp_no"], name: "emp_no", <%= i cond(5.0, using: :btree) %>
112
+ t.index ["emp_no"], name: "emp_no"
113
113
  end
114
114
  ERB
115
115
  end
@@ -7,7 +7,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
7
7
  create_table "employees", primary_key: "emp_no", force: :cascade do |t|
8
8
  t.string "first_name", limit: 14, null: false
9
9
  t.string "last_name", limit: 16, null: false
10
- t.index ["first_name", "last_name"], name: "first_name_last_name", unique: true, <%= i cond(5.0, using: :btree) %>
10
+ t.index ["first_name", "last_name"], name: "first_name_last_name", unique: true
11
11
  end
12
12
  ERB
13
13
  end
@@ -6,12 +6,12 @@ describe 'Ridgepole::Client#diff -> migrate' do
6
6
  erbh(<<-ERB)
7
7
  create_table "clubs", force: :cascade do |t|
8
8
  t.string "name", 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
12
  create_table "departments", primary_key: "dept_no", force: :cascade do |t|
13
13
  t.string "dept_name", limit: 40, null: false
14
- t.index ["dept_name"], name: "dept_name", unique: true, <%= i cond(5.0, using: :btree) %>
14
+ t.index ["dept_name"], name: "dept_name", unique: true
15
15
  end
16
16
 
17
17
  create_table "dept_emp", id: false, force: :cascade do |t|
@@ -19,8 +19,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
19
19
  t.string "dept_no", null: false
20
20
  t.date "from_date", null: false
21
21
  t.date "to_date", null: false
22
- t.index ["dept_no"], name: "dept_no", <%= i cond(5.0, using: :btree) %>
23
- t.index ["emp_no"], name: "emp_no", <%= i cond(5.0, using: :btree) %>
22
+ t.index ["dept_no"], name: "dept_no"
23
+ t.index ["emp_no"], name: "emp_no"
24
24
  end
25
25
 
26
26
  create_table "dept_manager", id: false, force: :cascade do |t|
@@ -28,14 +28,14 @@ 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: "dept_no", <%= i cond(5.0, using: :btree) %>
32
- t.index ["emp_no"], name: "emp_no", <%= i cond(5.0, using: :btree) %>
31
+ t.index ["dept_no"], name: "dept_no"
32
+ t.index ["emp_no"], name: "emp_no"
33
33
  end
34
34
 
35
35
  create_table "employee_clubs", 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_emp_no_club_id", <%= i cond(5.0, using: :btree) %>
38
+ t.index ["emp_no", "club_id"], name: "idx_emp_no_club_id"
39
39
  end
40
40
 
41
41
  create_table "employees", primary_key: "emp_no", force: :cascade do |t|
@@ -51,7 +51,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
51
51
  t.integer "salary", null: false
52
52
  t.date "from_date", null: false
53
53
  t.date "to_date", null: false
54
- t.index ["emp_no"], name: "emp_no", <%= i cond(5.0, using: :btree) %>
54
+ t.index ["emp_no"], name: "emp_no"
55
55
  end
56
56
 
57
57
  create_table "titles", id: false, force: :cascade do |t|
@@ -59,7 +59,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
59
59
  t.string "title", limit: 50, null: false
60
60
  t.date "from_date", null: false
61
61
  t.date "to_date"
62
- t.index ["emp_no"], name: "emp_no", <%= i cond(5.0, using: :btree) %>
62
+ t.index ["emp_no"], name: "emp_no"
63
63
  end
64
64
  ERB
65
65
  end
@@ -68,32 +68,32 @@ describe 'Ridgepole::Client#diff -> migrate' do
68
68
  erbh(<<-ERB)
69
69
  create_table "clubs", force: :cascade do |t|
70
70
  t.string "name", default: "", null: false
71
- t.index ["name"], name: "idx_name", unique: true, <%= i cond(5.0, using: :btree) %>
71
+ t.index ["name"], name: "idx_name", unique: true
72
72
  end
73
73
 
74
74
  create_table "departments", primary_key: "dept_no", force: :cascade do |t|
75
75
  t.string "dept_name", limit: 40, null: false
76
- t.index ["dept_name"], name: "dept_name", unique: true, <%= i cond(5.0, using: :btree) %>
76
+ t.index ["dept_name"], name: "dept_name", unique: true
77
77
  end
78
78
 
79
79
  create_table "dept_emp", id: false, force: :cascade do |t|
80
80
  t.integer "emp_no", null: false
81
81
  t.string "dept_no", null: false
82
- t.index ["dept_no"], name: "dept_no", <%= i cond(5.0, using: :btree) %>
83
- t.index ["emp_no"], name: "emp_no", <%= i cond(5.0, using: :btree) %>
82
+ t.index ["dept_no"], name: "dept_no"
83
+ t.index ["emp_no"], name: "emp_no"
84
84
  end
85
85
 
86
86
  create_table "dept_manager", id: false, force: :cascade do |t|
87
87
  t.string "dept_no", null: false
88
88
  t.integer "emp_no", null: false
89
- t.index ["dept_no"], name: "dept_no", <%= i cond(5.0, using: :btree) %>
90
- t.index ["emp_no"], name: "emp_no", <%= i cond(5.0, using: :btree) %>
89
+ t.index ["dept_no"], name: "dept_no"
90
+ t.index ["emp_no"], name: "emp_no"
91
91
  end
92
92
 
93
93
  create_table "employee_clubs", force: :cascade do |t|
94
94
  t.integer "emp_no", null: false
95
95
  t.integer "club_id", null: false
96
- t.index ["emp_no", "club_id"], name: "idx_emp_no_club_id", <%= i cond(5.0, using: :btree) %>
96
+ t.index ["emp_no", "club_id"], name: "idx_emp_no_club_id"
97
97
  end
98
98
 
99
99
  create_table "employees", primary_key: "emp_no", force: :cascade do |t|
@@ -106,7 +106,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
106
106
  t.integer "salary", null: false
107
107
  t.date "from_date", null: false
108
108
  t.date "to_date", null: false
109
- t.index ["emp_no"], name: "emp_no", <%= i cond(5.0, using: :btree) %>
109
+ t.index ["emp_no"], name: "emp_no"
110
110
  end
111
111
 
112
112
  create_table "titles", id: false, force: :cascade do |t|
@@ -114,7 +114,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
114
114
  t.string "title", limit: 50, null: false
115
115
  t.date "from_date", null: false
116
116
  t.date "to_date"
117
- t.index ["emp_no"], name: "emp_no", <%= i cond(5.0, using: :btree) %>
117
+ t.index ["emp_no"], name: "emp_no"
118
118
  end
119
119
  ERB
120
120
  end
@@ -6,12 +6,12 @@ describe 'Ridgepole::Client#diff -> migrate' do
6
6
  erbh(<<-ERB)
7
7
  create_table "clubs", force: :cascade do |t|
8
8
  t.string "name", 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
12
  create_table "departments", primary_key: "dept_no", force: :cascade do |t|
13
13
  t.string "dept_name", limit: 40, null: false
14
- t.index ["dept_name"], name: "dept_name", unique: true, <%= i cond(5.0, using: :btree) %>
14
+ t.index ["dept_name"], name: "dept_name", unique: true
15
15
  end
16
16
 
17
17
  create_table "dept_emp", id: false, force: :cascade do |t|
@@ -19,8 +19,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
19
19
  t.string "dept_no", null: false
20
20
  t.date "from_date", null: false
21
21
  t.date "to_date", null: false
22
- t.index ["dept_no"], name: "dept_no", <%= i cond(5.0, using: :btree) %>
23
- t.index ["emp_no"], name: "emp_no", <%= i cond(5.0, using: :btree) %>
22
+ t.index ["dept_no"], name: "dept_no"
23
+ t.index ["emp_no"], name: "emp_no"
24
24
  end
25
25
 
26
26
  create_table "dept_manager", id: false, force: :cascade do |t|
@@ -28,14 +28,14 @@ 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: "dept_no", <%= i cond(5.0, using: :btree) %>
32
- t.index ["emp_no"], name: "emp_no", <%= i cond(5.0, using: :btree) %>
31
+ t.index ["dept_no"], name: "dept_no"
32
+ t.index ["emp_no"], name: "emp_no"
33
33
  end
34
34
 
35
35
  create_table "employee_clubs", 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_emp_no_club_id", <%= i cond(5.0, using: :btree) %>
38
+ t.index ["emp_no", "club_id"], name: "idx_emp_no_club_id"
39
39
  end
40
40
 
41
41
  create_table "employees", primary_key: "emp_no", force: :cascade do |t|
@@ -51,7 +51,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
51
51
  t.integer "salary", null: false
52
52
  t.date "from_date", null: false
53
53
  t.date "to_date", null: false
54
- t.index ["emp_no"], name: "emp_no", <%= i cond(5.0, using: :btree) %>
54
+ t.index ["emp_no"], name: "emp_no"
55
55
  end
56
56
 
57
57
  create_table "titles", id: false, force: :cascade do |t|
@@ -59,7 +59,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
59
59
  t.string "title", limit: 50, null: false
60
60
  t.date "from_date", null: false
61
61
  t.date "to_date"
62
- t.index ["emp_no"], name: "emp_no", <%= i cond(5.0, using: :btree) %>
62
+ t.index ["emp_no"], name: "emp_no"
63
63
  end
64
64
  ERB
65
65
  end
@@ -74,7 +74,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
74
74
 
75
75
  create_table "departments", primary_key: "dept_no", force: :cascade do |t|
76
76
  t.string "dept_name", limit: 40, null: false
77
- t.index ["dept_name"], name: "dept_name", unique: true, <%= i cond(5.0, using: :btree) %>
77
+ t.index ["dept_name"], name: "dept_name", unique: true
78
78
  end
79
79
 
80
80
  create_table "dept_emp", id: false, force: :cascade do |t|
@@ -82,8 +82,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
82
82
  t.string "dept_no", null: false
83
83
  t.date "from_date", null: false
84
84
  t.date "to_date", null: false
85
- t.index ["dept_no"], name: "dept_no", <%= i cond(5.0, using: :btree) %>
86
- t.index ["emp_no"], name: "emp_no", <%= i cond(5.0, using: :btree) %>
85
+ t.index ["dept_no"], name: "dept_no"
86
+ t.index ["emp_no"], name: "emp_no"
87
87
  end
88
88
 
89
89
  create_table "dept_manager", id: false, force: :cascade do |t|
@@ -91,8 +91,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
91
91
  t.integer "emp_no", null: false
92
92
  t.date "from_date", null: false
93
93
  t.date "to_date", null: false
94
- t.index ["dept_no"], name: "dept_no", <%= i cond(5.0, using: :btree) %>
95
- t.index ["emp_no"], name: "emp_no", <%= i cond(5.0, using: :btree) %>
94
+ t.index ["dept_no"], name: "dept_no"
95
+ t.index ["emp_no"], name: "emp_no"
96
96
  end
97
97
 
98
98
  create_table "employee_clubs", force: :cascade do |t|
@@ -113,7 +113,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
113
113
  t.integer "salary", null: false
114
114
  t.date "from_date", null: false
115
115
  t.date "to_date", null: false
116
- t.index ["emp_no"], name: "emp_no", <%= i cond(5.0, using: :btree) %>
116
+ t.index ["emp_no"], name: "emp_no"
117
117
  end
118
118
 
119
119
  create_table "titles", id: false, force: :cascade do |t|
@@ -6,12 +6,12 @@ describe 'Ridgepole::Client#diff -> migrate' do
6
6
  erbh(<<-ERB)
7
7
  create_table "clubs", force: :cascade do |t|
8
8
  t.string "name", 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
12
  create_table "departments", primary_key: "dept_no", force: :cascade do |t|
13
13
  t.string "dept_name", limit: 40, null: false
14
- t.index ["dept_name"], name: "dept_name", unique: true, <%= i cond(5.0, using: :btree) %>
14
+ t.index ["dept_name"], name: "dept_name", unique: true
15
15
  end
16
16
 
17
17
  create_table "dept_emp", id: false, force: :cascade do |t|
@@ -19,8 +19,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
19
19
  t.string "dept_no", null: false
20
20
  t.date "from_date", null: false
21
21
  t.date "to_date", null: false
22
- t.index ["dept_no"], name: "dept_no", <%= i cond(5.0, using: :btree) %>
23
- t.index ["emp_no"], name: "emp_no", <%= i cond(5.0, using: :btree) %>
22
+ t.index ["dept_no"], name: "dept_no"
23
+ t.index ["emp_no"], name: "emp_no"
24
24
  end
25
25
 
26
26
  create_table "dept_manager", id: false, force: :cascade do |t|
@@ -28,14 +28,14 @@ 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: "dept_no", <%= i cond(5.0, using: :btree) %>
32
- t.index ["emp_no"], name: "emp_no", <%= i cond(5.0, using: :btree) %>
31
+ t.index ["dept_no"], name: "dept_no"
32
+ t.index ["emp_no"], name: "emp_no"
33
33
  end
34
34
 
35
35
  create_table "employee_clubs", 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_emp_no_club_id", <%= i cond(5.0, using: :btree) %>
38
+ t.index ["emp_no", "club_id"], name: "idx_emp_no_club_id"
39
39
  end
40
40
 
41
41
  create_table "employees", primary_key: "emp_no", force: :cascade do |t|
@@ -51,7 +51,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
51
51
  t.integer "salary", null: false
52
52
  t.date "from_date", null: false
53
53
  t.date "to_date", null: false
54
- t.index ["emp_no"], name: "emp_no", <%= i cond(5.0, using: :btree) %>
54
+ t.index ["emp_no"], name: "emp_no"
55
55
  end
56
56
 
57
57
  create_table "titles", id: false, force: :cascade do |t|
@@ -59,7 +59,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
59
59
  t.string "title", limit: 50, null: false
60
60
  t.date "from_date", null: false
61
61
  t.date "to_date"
62
- t.index ["emp_no"], name: "emp_no", <%= i cond(5.0, using: :btree) %>
62
+ t.index ["emp_no"], name: "emp_no"
63
63
  end
64
64
  ERB
65
65
  end
@@ -70,7 +70,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
70
70
  erbh(<<-ERB)
71
71
  create_table "departments", primary_key: "dept_no", force: :cascade do |t|
72
72
  t.string "dept_name", limit: 40, null: false
73
- t.index ["dept_name"], name: "dept_name", unique: true, <%= i cond(5.0, using: :btree) %>
73
+ t.index ["dept_name"], name: "dept_name", unique: true
74
74
  end
75
75
 
76
76
  create_table "dept_emp", id: false, force: :cascade do |t|
@@ -78,8 +78,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
78
78
  t.string "dept_no", null: false
79
79
  t.date "from_date", null: false
80
80
  t.date "to_date", null: false
81
- t.index ["dept_no"], name: "dept_no", <%= i cond(5.0, using: :btree) %>
82
- t.index ["emp_no"], name: "emp_no", <%= i cond(5.0, using: :btree) %>
81
+ t.index ["dept_no"], name: "dept_no"
82
+ t.index ["emp_no"], name: "emp_no"
83
83
  end
84
84
 
85
85
  create_table "dept_manager", id: false, force: :cascade do |t|
@@ -87,8 +87,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
87
87
  t.integer "emp_no", null: false
88
88
  t.date "from_date", null: false
89
89
  t.date "to_date", null: false
90
- t.index ["dept_no"], name: "dept_no", <%= i cond(5.0, using: :btree) %>
91
- t.index ["emp_no"], name: "emp_no", <%= i cond(5.0, using: :btree) %>
90
+ t.index ["dept_no"], name: "dept_no"
91
+ t.index ["emp_no"], name: "emp_no"
92
92
  end
93
93
 
94
94
  create_table "salaries", id: false, force: :cascade do |t|
@@ -96,7 +96,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
96
96
  t.integer "salary", null: false
97
97
  t.date "from_date", null: false
98
98
  t.date "to_date", null: false
99
- t.index ["emp_no"], name: "emp_no", <%= i cond(5.0, using: :btree) %>
99
+ t.index ["emp_no"], name: "emp_no"
100
100
  end
101
101
 
102
102
  create_table "titles", id: false, force: :cascade do |t|
@@ -104,7 +104,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
104
104
  t.string "title", limit: 50, null: false
105
105
  t.date "from_date", null: false
106
106
  t.date "to_date"
107
- t.index ["emp_no"], name: "emp_no", <%= i cond(5.0, using: :btree) %>
107
+ t.index ["emp_no"], name: "emp_no"
108
108
  end
109
109
  ERB
110
110
  end
@@ -7,12 +7,12 @@ describe 'Ridgepole::Client#diff -> migrate' do
7
7
  erbh(<<-ERB)
8
8
  create_table "clubs", force: :cascade do |t|
9
9
  t.string "name", default: "", null: false
10
- t.index ["name"], name: "idx_name", unique: true, <%= i cond(5.0, using: :btree) %>
10
+ t.index ["name"], name: "idx_name", unique: true
11
11
  end
12
12
 
13
13
  create_table "departments", primary_key: "dept_no", force: :cascade do |t|
14
14
  t.string "dept_name", limit: 40, null: false
15
- t.index ["dept_name"], name: "dept_name", unique: true, <%= i cond(5.0, using: :btree) %>
15
+ t.index ["dept_name"], name: "dept_name", unique: true
16
16
  end
17
17
 
18
18
  create_table "dept_emp", id: false, force: :cascade do |t|
@@ -20,8 +20,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
20
20
  t.string "dept_no", null: false
21
21
  t.date "from_date", null: false
22
22
  t.date "to_date", null: false
23
- t.index ["dept_no"], name: "dept_no", <%= i cond(5.0, using: :btree) %>
24
- t.index ["emp_no"], name: "emp_no", <%= i cond(5.0, using: :btree) %>
23
+ t.index ["dept_no"], name: "dept_no"
24
+ t.index ["emp_no"], name: "emp_no"
25
25
  end
26
26
 
27
27
  create_table "dept_manager", id: false, force: :cascade do |t|
@@ -29,14 +29,14 @@ describe 'Ridgepole::Client#diff -> migrate' do
29
29
  t.integer "emp_no", null: false
30
30
  t.date "from_date", null: false
31
31
  t.date "to_date", null: false
32
- t.index ["dept_no"], name: "dept_no", <%= i cond(5.0, using: :btree) %>
33
- t.index ["emp_no"], name: "emp_no", <%= i cond(5.0, using: :btree) %>
32
+ t.index ["dept_no"], name: "dept_no"
33
+ t.index ["emp_no"], name: "emp_no"
34
34
  end
35
35
 
36
36
  create_table "employee_clubs", force: :cascade do |t|
37
37
  t.integer "emp_no", null: false
38
38
  t.integer "club_id", null: false
39
- t.index ["emp_no", "club_id"], name: "idx_emp_no_club_id", <%= i cond(5.0, using: :btree) %>
39
+ t.index ["emp_no", "club_id"], name: "idx_emp_no_club_id"
40
40
  end
41
41
 
42
42
  create_table "employees", primary_key: "emp_no", force: :cascade do |t|
@@ -52,7 +52,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
52
52
  t.integer "salary", null: false
53
53
  t.date "from_date", null: false
54
54
  t.date "to_date", null: false
55
- t.index ["emp_no"], name: "emp_no", <%= i cond(5.0, using: :btree) %>
55
+ t.index ["emp_no"], name: "emp_no"
56
56
  end
57
57
 
58
58
  create_table "titles", id: false, force: :cascade do |t|
@@ -60,7 +60,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
60
60
  t.string "title", limit: 50, null: false
61
61
  t.date "from_date", null: false
62
62
  t.date "to_date"
63
- t.index ["emp_no"], name: "emp_no", <%= i cond(5.0, using: :btree) %>
63
+ t.index ["emp_no"], name: "emp_no"
64
64
  end
65
65
  ERB
66
66
  end