ridgepole 0.9.0.beta → 0.9.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (124) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test.yml +19 -1
  3. data/.simplecov +6 -0
  4. data/README.md +4 -26
  5. data/bin/ridgepole +0 -2
  6. data/lib/ridgepole/diff.rb +7 -11
  7. data/lib/ridgepole/dsl_parser/table_definition.rb +1 -1
  8. data/lib/ridgepole/version.rb +1 -1
  9. data/ridgepole.gemspec +2 -1
  10. data/spec/erb_helper.rb +1 -5
  11. data/spec/mysql/bigint_pk/int_pk_spec.rb +1 -1
  12. data/spec/mysql/collation/collation_spec.rb +14 -14
  13. data/spec/mysql/comment/comment_spec.rb +9 -9
  14. data/spec/mysql/diff/diff2_spec.rb +5 -5
  15. data/spec/mysql/diff/diff_spec.rb +3 -3
  16. data/spec/mysql/dump/dump_class_method_spec.rb +12 -12
  17. data/spec/mysql/dump/dump_some_tables_spec.rb +4 -4
  18. data/spec/mysql/dump/dump_spec.rb +12 -12
  19. data/spec/mysql/dump/dump_unknown_column_type_spec.rb +2 -2
  20. data/spec/mysql/dump/dump_without_table_options_spec.rb +1 -1
  21. data/spec/mysql/fk/migrate_change_fk2_spec.rb +2 -2
  22. data/spec/mysql/fk/migrate_change_fk_spec.rb +20 -20
  23. data/spec/mysql/fk/migrate_create_fk_spec.rb +18 -18
  24. data/spec/mysql/fk/migrate_drop_fk_spec.rb +26 -26
  25. data/spec/mysql/fk/migrate_fk_with_column_spec.rb +16 -16
  26. data/spec/mysql/fk/migrate_ignore_fk_spec.rb +6 -6
  27. data/spec/mysql/migrate/migrate_add_column_order_spec.rb +2 -2
  28. data/spec/mysql/migrate/migrate_add_column_spec.rb +18 -18
  29. data/spec/mysql/migrate/migrate_add_column_with_alter_extra_spec.rb +21 -21
  30. data/spec/mysql/migrate/migrate_add_column_with_script_spec.rb +18 -18
  31. data/spec/mysql/migrate/migrate_change_column2_spec.rb +5 -5
  32. data/spec/mysql/migrate/migrate_change_column3_spec.rb +10 -10
  33. data/spec/mysql/migrate/migrate_change_column5_spec.rb +3 -3
  34. data/spec/mysql/migrate/migrate_change_column6_spec.rb +7 -7
  35. data/spec/mysql/migrate/migrate_change_column_default_spec.rb +2 -14
  36. data/spec/mysql/migrate/migrate_change_column_spec.rb +21 -21
  37. data/spec/mysql/migrate/migrate_change_index2_spec.rb +5 -5
  38. data/spec/mysql/migrate/migrate_change_index3_spec.rb +7 -7
  39. data/spec/mysql/migrate/migrate_change_index4_spec.rb +6 -6
  40. data/spec/mysql/migrate/migrate_change_index5_spec.rb +4 -4
  41. data/spec/mysql/migrate/migrate_change_index6_spec.rb +27 -27
  42. data/spec/mysql/migrate/migrate_change_index7_spec.rb +4 -4
  43. data/spec/mysql/migrate/migrate_change_index8_spec.rb +4 -4
  44. data/spec/mysql/migrate/migrate_change_index_spec.rb +27 -27
  45. data/spec/mysql/migrate/migrate_check_relation_column_type_spec.rb +1 -1
  46. data/spec/mysql/migrate/migrate_create_index2_spec.rb +24 -24
  47. data/spec/mysql/migrate/migrate_create_index_spec.rb +18 -18
  48. data/spec/mysql/migrate/migrate_create_table_spec.rb +16 -16
  49. data/spec/mysql/migrate/migrate_create_table_with_ignore_spec.rb +4 -4
  50. data/spec/mysql/migrate/migrate_create_table_with_index_spec.rb +4 -4
  51. data/spec/mysql/migrate/migrate_create_table_with_script_spec.rb +16 -16
  52. data/spec/mysql/migrate/migrate_drop_column_and_index2_spec.rb +18 -18
  53. data/spec/mysql/migrate/migrate_drop_column_and_index_spec.rb +16 -16
  54. data/spec/mysql/migrate/migrate_drop_column_and_unique_index_spec.rb +1 -1
  55. data/spec/mysql/migrate/migrate_drop_column_spec.rb +18 -18
  56. data/spec/mysql/migrate/migrate_drop_index_spec.rb +15 -15
  57. data/spec/mysql/migrate/migrate_drop_table_spec.rb +16 -16
  58. data/spec/mysql/migrate/migrate_empty_spec.rb +9 -9
  59. data/spec/mysql/migrate/migrate_execute_spec.rb +32 -32
  60. data/spec/mysql/migrate/migrate_ignore_column_spec.rb +4 -4
  61. data/spec/mysql/migrate/migrate_ignore_index_spec.rb +5 -5
  62. data/spec/mysql/migrate/migrate_log_file_spec.rb +16 -16
  63. data/spec/mysql/migrate/migrate_merge_mode_spec.rb +18 -18
  64. data/spec/mysql/migrate/migrate_noop_spec.rb +12 -12
  65. data/spec/mysql/migrate/migrate_primary_key_spec.rb +1 -1
  66. data/spec/mysql/migrate/migrate_rename_column_spec.rb +18 -18
  67. data/spec/mysql/migrate/migrate_rename_table_spec.rb +22 -22
  68. data/spec/mysql/migrate/migrate_same_spec.rb +12 -12
  69. data/spec/mysql/migrate/migrate_skip_column_comment_change_spec.rb +2 -2
  70. data/spec/mysql/migrate/migrate_skip_drop_table_spec.rb +18 -18
  71. data/spec/mysql/migrate/migrate_skip_rename_column_spec.rb +18 -18
  72. data/spec/mysql/migrate/migrate_skip_rename_table_spec.rb +18 -18
  73. data/spec/mysql/migrate/migrate_with_pre_post_query_spec.rb +18 -18
  74. data/spec/mysql/text_blob_types/text_blob_types_spec.rb +1 -1
  75. data/spec/mysql/~default_name_fk/migrate_change_fk_spec.rb +6 -6
  76. data/spec/mysql/~default_name_fk/migrate_create_fk_spec.rb +9 -9
  77. data/spec/mysql/~default_name_fk/migrate_drop_fk_spec.rb +8 -8
  78. data/spec/mysql/~dump_auto_increment/migrate_create_table_with_index_spec.rb +5 -5
  79. data/spec/mysql57/json/add_json_column_spec.rb +2 -2
  80. data/spec/mysql57/json/change_json_column_spec.rb +6 -6
  81. data/spec/mysql57/json/drop_json_column_spec.rb +2 -2
  82. data/spec/mysql57/virtual/add_virtual_column_spec.rb +1 -1
  83. data/spec/mysql57/virtual/change_virtual_column_spec.rb +1 -1
  84. data/spec/mysql57/virtual/drop_virtual_column_spec.rb +1 -1
  85. data/spec/postgresql/dump/dump_spec.rb +12 -12
  86. data/spec/postgresql/fk/migrate_change_fk_spec.rb +6 -6
  87. data/spec/postgresql/fk/migrate_create_fk_spec.rb +5 -5
  88. data/spec/postgresql/fk/migrate_drop_fk_spec.rb +8 -8
  89. data/spec/postgresql/migrate/migrate_add_column_spec.rb +16 -16
  90. data/spec/postgresql/migrate/migrate_add_expression_index_spec.rb +1 -1
  91. data/spec/postgresql/migrate/migrate_change_column_spec.rb +16 -16
  92. data/spec/postgresql/migrate/migrate_change_index_spec.rb +18 -18
  93. data/spec/postgresql/migrate/migrate_check_relation_column_type_spec.rb +1 -1
  94. data/spec/postgresql/migrate/migrate_create_table_spec.rb +14 -14
  95. data/spec/postgresql/migrate/migrate_drop_column_spec.rb +18 -18
  96. data/spec/postgresql/migrate/migrate_drop_column_with_index_spec.rb +17 -17
  97. data/spec/postgresql/migrate/migrate_drop_expression_index_spec.rb +3 -3
  98. data/spec/postgresql/migrate/migrate_drop_index_spec.rb +15 -15
  99. data/spec/postgresql/migrate/migrate_drop_table_spec.rb +16 -16
  100. data/spec/postgresql/migrate/migrate_primary_key2_spec.rb +1 -1
  101. data/spec/postgresql/migrate/migrate_primary_key_spec.rb +1 -1
  102. data/spec/postgresql/migrate/migrate_references_spec.rb +6 -6
  103. data/spec/postgresql/migrate/migrate_rename_column_spec.rb +18 -18
  104. data/spec/postgresql/migrate/migrate_rename_table_spec.rb +20 -20
  105. data/spec/postgresql/migrate/migrate_same_spec.rb +12 -12
  106. data/spec/postgresql/~default_name_fk/migrate_change_fk_spec.rb +3 -3
  107. data/spec/postgresql/~default_name_fk/migrate_create_fk_spec.rb +4 -4
  108. data/spec/postgresql/~default_name_fk/migrate_drop_fk_spec.rb +4 -4
  109. data/spec/processing_for_ci.rb +13 -0
  110. data/spec/spec_helper.rb +1 -1
  111. metadata +33 -31
  112. data/omnibus-ridgepole/.gitignore +0 -10
  113. data/omnibus-ridgepole/Dockerfile.centos +0 -25
  114. data/omnibus-ridgepole/Dockerfile.ubuntu +0 -21
  115. data/omnibus-ridgepole/Gemfile +0 -24
  116. data/omnibus-ridgepole/README.md +0 -15
  117. data/omnibus-ridgepole/Rakefile +0 -38
  118. data/omnibus-ridgepole/config/projects/ridgepole.rb +0 -27
  119. data/omnibus-ridgepole/config/software/ridgepole.rb +0 -13
  120. data/omnibus-ridgepole/omnibus.rb +0 -54
  121. data/omnibus-ridgepole/package-scripts/ridgepole/postinst +0 -1
  122. data/omnibus-ridgepole/package-scripts/ridgepole/postrm +0 -1
  123. data/spec/mysql/bigint_pk/bigint_pk_spec.rb +0 -47
  124. 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", limit: 255, default: "", null: false
9
- t.index ["name"], name: "idx_name", unique: true, <%= i cond(5.0, using: :btree) %>
9
+ t.index ["name"], name: "idx_name", unique: true
10
10
  end
11
11
 
12
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: "idx_dept_name", unique: true, <%= i cond(5.0, using: :btree) %>
14
+ t.index ["dept_name"], name: "idx_dept_name", unique: true
15
15
  end
16
16
 
17
17
  create_table "dept_emp", id: false, force: :cascade do |t|
@@ -19,8 +19,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
19
19
  t.string "dept_no", limit: 4, null: false
20
20
  t.date "from_date", null: false
21
21
  t.date "to_date", null: false
22
- t.index ["dept_no"], name: "idx_dept_emp_dept_no", <%= i cond(5.0, using: :btree) %>
23
- t.index ["emp_no"], name: "idx_dept_emp_emp_no", <%= i cond(5.0, using: :btree) %>
22
+ t.index ["dept_no"], name: "idx_dept_emp_dept_no"
23
+ t.index ["emp_no"], name: "idx_dept_emp_emp_no"
24
24
  end
25
25
 
26
26
  create_table "dept_manager", 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: "idx_dept_manager_dept_no", <%= i cond(5.0, using: :btree) %>
32
- t.index ["emp_no"], name: "idx_dept_manager_emp_no", <%= i cond(5.0, using: :btree) %>
31
+ t.index ["dept_no"], name: "idx_dept_manager_dept_no"
32
+ t.index ["emp_no"], name: "idx_dept_manager_emp_no"
33
33
  end
34
34
 
35
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_employee_clubs_emp_no_club_id", <%= i cond(5.0, using: :btree) %>
38
+ t.index ["emp_no", "club_id"], name: "idx_employee_clubs_emp_no_club_id"
39
39
  end
40
40
 
41
41
  create_table "employees", primary_key: "emp_no", force: :cascade do |t|
@@ -50,7 +50,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
50
50
  t.integer "salary", null: false
51
51
  t.date "from_date", null: false
52
52
  t.date "to_date", null: false
53
- t.index ["emp_no"], name: "idx_salaries_emp_no", <%= i cond(5.0, using: :btree) %>
53
+ t.index ["emp_no"], name: "idx_salaries_emp_no"
54
54
  end
55
55
 
56
56
  create_table "titles", id: false, force: :cascade do |t|
@@ -60,7 +60,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
60
60
  t.date "to_date"
61
61
  t.serial "title_no", null: false
62
62
  t.bigserial "title_bigno", null: false
63
- t.index ["emp_no"], name: "idx_titles_emp_no", <%= i cond(5.0, using: :btree) %>
63
+ t.index ["emp_no"], name: "idx_titles_emp_no"
64
64
  end
65
65
  ERB
66
66
  end
@@ -69,32 +69,32 @@ describe 'Ridgepole::Client#diff -> migrate' do
69
69
  erbh(<<-ERB)
70
70
  create_table "clubs", force: :cascade do |t|
71
71
  t.string "name", limit: 255, default: "", null: false
72
- t.index ["name"], name: "idx_name", unique: true, <%= i cond(5.0, using: :btree) %>
72
+ t.index ["name"], name: "idx_name", unique: true
73
73
  end
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: "idx_dept_name", unique: true, <%= i cond(5.0, using: :btree) %>
77
+ t.index ["dept_name"], name: "idx_dept_name", unique: true
78
78
  end
79
79
 
80
80
  create_table "dept_emp", id: false, force: :cascade do |t|
81
81
  t.integer "emp_no", null: false
82
82
  t.string "dept_no", limit: 4, null: false
83
- t.index ["dept_no"], name: "idx_dept_emp_dept_no", <%= i cond(5.0, using: :btree) %>
84
- t.index ["emp_no"], name: "idx_dept_emp_emp_no", <%= i cond(5.0, using: :btree) %>
83
+ t.index ["dept_no"], name: "idx_dept_emp_dept_no"
84
+ t.index ["emp_no"], name: "idx_dept_emp_emp_no"
85
85
  end
86
86
 
87
87
  create_table "dept_manager", id: false, force: :cascade do |t|
88
88
  t.string "dept_no", limit: 4, null: false
89
89
  t.integer "emp_no", null: false
90
- t.index ["dept_no"], name: "idx_dept_manager_dept_no", <%= i cond(5.0, using: :btree) %>
91
- t.index ["emp_no"], name: "idx_dept_manager_emp_no", <%= i cond(5.0, using: :btree) %>
90
+ t.index ["dept_no"], name: "idx_dept_manager_dept_no"
91
+ t.index ["emp_no"], name: "idx_dept_manager_emp_no"
92
92
  end
93
93
 
94
94
  create_table "employee_clubs", force: :cascade do |t|
95
95
  t.integer "emp_no", null: false
96
96
  t.integer "club_id", null: false
97
- t.index ["emp_no", "club_id"], name: "idx_employee_clubs_emp_no_club_id", <%= i cond(5.0, using: :btree) %>
97
+ t.index ["emp_no", "club_id"], name: "idx_employee_clubs_emp_no_club_id"
98
98
  end
99
99
 
100
100
  create_table "employees", primary_key: "emp_no", force: :cascade do |t|
@@ -107,7 +107,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
107
107
  t.integer "salary", null: false
108
108
  t.date "from_date", null: false
109
109
  t.date "to_date", null: false
110
- t.index ["emp_no"], name: "idx_salaries_emp_no", <%= i cond(5.0, using: :btree) %>
110
+ t.index ["emp_no"], name: "idx_salaries_emp_no"
111
111
  end
112
112
 
113
113
  create_table "titles", id: false, force: :cascade do |t|
@@ -115,7 +115,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
115
115
  t.string "title", limit: 50, null: false
116
116
  t.date "from_date", null: false
117
117
  t.date "to_date"
118
- t.index ["emp_no"], name: "idx_titles_emp_no", <%= i cond(5.0, using: :btree) %>
118
+ t.index ["emp_no"], name: "idx_titles_emp_no"
119
119
  end
120
120
  ERB
121
121
  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", limit: 255, default: "", null: false
9
- t.index ["name"], name: "idx_name", unique: true, <%= i cond(5.0, using: :btree) %>
9
+ t.index ["name"], name: "idx_name", unique: true
10
10
  end
11
11
 
12
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: "idx_dept_name", unique: true, <%= i cond(5.0, using: :btree) %>
14
+ t.index ["dept_name"], name: "idx_dept_name", unique: true
15
15
  end
16
16
 
17
17
  create_table "dept_emp", id: false, force: :cascade do |t|
@@ -19,8 +19,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
19
19
  t.string "dept_no", limit: 4, null: false
20
20
  t.date "from_date", null: false
21
21
  t.date "to_date", null: false
22
- t.index ["dept_no"], name: "idx_dept_emp_dept_no", <%= i cond(5.0, using: :btree) %>
23
- t.index ["emp_no"], name: "idx_dept_emp_emp_no", <%= i cond(5.0, using: :btree) %>
22
+ t.index ["dept_no"], name: "idx_dept_emp_dept_no"
23
+ t.index ["emp_no"], name: "idx_dept_emp_emp_no"
24
24
  end
25
25
 
26
26
  create_table "dept_manager", 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: "idx_dept_manager_dept_no", <%= i cond(5.0, using: :btree) %>
32
- t.index ["emp_no"], name: "idx_dept_manager_emp_no", <%= i cond(5.0, using: :btree) %>
31
+ t.index ["dept_no"], name: "idx_dept_manager_dept_no"
32
+ t.index ["emp_no"], name: "idx_dept_manager_emp_no"
33
33
  end
34
34
 
35
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_employee_clubs_emp_no_club_id", <%= i cond(5.0, using: :btree) %>
38
+ t.index ["emp_no", "club_id"], name: "idx_employee_clubs_emp_no_club_id"
39
39
  end
40
40
 
41
41
  create_table "employees", primary_key: "emp_no", force: :cascade do |t|
@@ -50,7 +50,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
50
50
  t.integer "salary", null: false
51
51
  t.date "from_date", null: false
52
52
  t.date "to_date", null: false
53
- t.index ["emp_no"], name: "idx_salaries_emp_no", <%= i cond(5.0, using: :btree) %>
53
+ t.index ["emp_no"], name: "idx_salaries_emp_no"
54
54
  end
55
55
 
56
56
  create_table "titles", id: false, force: :cascade do |t|
@@ -58,7 +58,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
58
58
  t.string "title", limit: 50, null: false
59
59
  t.date "from_date", null: false
60
60
  t.date "to_date"
61
- t.index ["emp_no"], name: "idx_titles_emp_no", <%= i cond(5.0, using: :btree) %>
61
+ t.index ["emp_no"], name: "idx_titles_emp_no"
62
62
  end
63
63
  ERB
64
64
  end
@@ -67,27 +67,27 @@ describe 'Ridgepole::Client#diff -> migrate' do
67
67
  erbh(<<-ERB)
68
68
  create_table "clubs", force: :cascade do |t|
69
69
  t.string "name", limit: 255, default: "", null: false
70
- t.index ["name"], name: "idx_name", unique: true, <%= i cond(5.0, using: :btree) %>
70
+ t.index ["name"], name: "idx_name", unique: true
71
71
  end
72
72
 
73
73
  create_table "departments", primary_key: "dept_no", force: :cascade do |t|
74
74
  t.string "dept_name", limit: 40, null: false
75
- t.index ["dept_name"], name: "idx_dept_name", unique: true, <%= i cond(5.0, using: :btree) %>
75
+ t.index ["dept_name"], name: "idx_dept_name", unique: true
76
76
  end
77
77
 
78
78
  create_table "dept_emp", id: false, force: :cascade do |t|
79
79
  t.string "dept_no", limit: 4, null: false
80
- t.index ["dept_no"], name: "idx_dept_emp_dept_no", <%= i cond(5.0, using: :btree) %>
80
+ t.index ["dept_no"], name: "idx_dept_emp_dept_no"
81
81
  end
82
82
 
83
83
  create_table "dept_manager", id: false, force: :cascade do |t|
84
84
  t.string "dept_no", limit: 4, null: false
85
- t.index ["dept_no"], name: "idx_dept_manager_dept_no", <%= i cond(5.0, using: :btree) %>
85
+ t.index ["dept_no"], name: "idx_dept_manager_dept_no"
86
86
  end
87
87
 
88
88
  create_table "employee_clubs", force: :cascade do |t|
89
89
  t.integer "emp_no", null: false
90
- t.index ["emp_no"], name: "idx_employee_clubs_emp_no", <%= i cond(5.0, using: :btree) %>
90
+ t.index ["emp_no"], name: "idx_employee_clubs_emp_no"
91
91
  end
92
92
 
93
93
  create_table "employees", primary_key: "emp_no", force: :cascade do |t|
@@ -100,7 +100,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
100
100
  t.integer "salary", null: false
101
101
  t.date "from_date", null: false
102
102
  t.date "to_date", null: false
103
- t.index ["emp_no"], name: "idx_salaries_emp_no", <%= i cond(5.0, using: :btree) %>
103
+ t.index ["emp_no"], name: "idx_salaries_emp_no"
104
104
  end
105
105
 
106
106
  create_table "titles", id: false, force: :cascade do |t|
@@ -108,7 +108,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
108
108
  t.string "title", limit: 50, null: false
109
109
  t.date "from_date", null: false
110
110
  t.date "to_date"
111
- t.index ["emp_no"], name: "idx_titles_emp_no", <%= i cond(5.0, using: :btree) %>
111
+ t.index ["emp_no"], name: "idx_titles_emp_no"
112
112
  end
113
113
  ERB
114
114
  end
@@ -151,7 +151,7 @@ end
151
151
 
152
152
  change_table("employee_clubs", bulk: true) do |t|
153
153
  t.remove("club_id")
154
- t.index(["emp_no"], **<%= {:name=>"idx_employee_clubs_emp_no"} + cond(5.0, using: :btree) %>)
154
+ t.index(["emp_no"], **{:name=>"idx_employee_clubs_emp_no"})
155
155
  end
156
156
 
157
157
  change_table("employees", bulk: true) do |t|
@@ -12,14 +12,14 @@ describe 'Ridgepole::Client#diff -> migrate' do
12
12
  create_table "users", force: :cascade do |t|
13
13
  t.string "name", null: false
14
14
  t.datetime "created_at", null: false
15
- t.index "lower((name)::text)", name: "index_users_on_lower_name", <%= i cond(5.0, using: :btree) %>
15
+ t.index "lower((name)::text)", name: "index_users_on_lower_name"
16
16
  end
17
17
  ERB
18
18
 
19
19
  let(:expected_dsl) { erbh(<<-ERB) }
20
20
  create_table "users", force: :cascade do |t|
21
21
  t.string "name", null: false
22
- t.index "lower((name)::text)", name: "index_users_on_lower_name", <%= i cond(5.0, using: :btree) %>
22
+ t.index "lower((name)::text)", name: "index_users_on_lower_name"
23
23
  end
24
24
  ERB
25
25
 
@@ -37,7 +37,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
37
37
  let(:actual_dsl) { erbh(<<-ERB) }
38
38
  create_table "users", force: :cascade do |t|
39
39
  t.string "name", null: false
40
- t.index "lower((name)::text)", name: "index_users_on_lower_name", <%= i cond(5.0, using: :btree) %>
40
+ t.index "lower((name)::text)", name: "index_users_on_lower_name"
41
41
  end
42
42
  ERB
43
43
 
@@ -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", limit: 255, default: "", null: false
9
- t.index ["name"], name: "idx_name", unique: true, <%= i cond(5.0, using: :btree) %>
9
+ t.index ["name"], name: "idx_name", unique: true
10
10
  end
11
11
 
12
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: "idx_dept_name", unique: true, <%= i cond(5.0, using: :btree) %>
14
+ t.index ["dept_name"], name: "idx_dept_name", unique: true
15
15
  end
16
16
 
17
17
  create_table "dept_emp", id: false, force: :cascade do |t|
@@ -19,8 +19,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
19
19
  t.string "dept_no", limit: 4, null: false
20
20
  t.date "from_date", null: false
21
21
  t.date "to_date", null: false
22
- t.index ["dept_no"], name: "idx_dept_emp_dept_no", <%= i cond(5.0, using: :btree) %>
23
- t.index ["emp_no"], name: "idx_dept_emp_emp_no", <%= i cond(5.0, using: :btree) %>
22
+ t.index ["dept_no"], name: "idx_dept_emp_dept_no"
23
+ t.index ["emp_no"], name: "idx_dept_emp_emp_no"
24
24
  end
25
25
 
26
26
  create_table "dept_manager", 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: "idx_dept_manager_dept_no", <%= i cond(5.0, using: :btree) %>
32
- t.index ["emp_no"], name: "idx_dept_manager_emp_no", <%= i cond(5.0, using: :btree) %>
31
+ t.index ["dept_no"], name: "idx_dept_manager_dept_no"
32
+ t.index ["emp_no"], name: "idx_dept_manager_emp_no"
33
33
  end
34
34
 
35
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_employee_clubs_emp_no_club_id", <%= i cond(5.0, using: :btree) %>
38
+ t.index ["emp_no", "club_id"], name: "idx_employee_clubs_emp_no_club_id"
39
39
  end
40
40
 
41
41
  create_table "employees", primary_key: "emp_no", force: :cascade do |t|
@@ -50,7 +50,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
50
50
  t.integer "salary", null: false
51
51
  t.date "from_date", null: false
52
52
  t.date "to_date", null: false
53
- t.index ["emp_no"], name: "idx_salaries_emp_no", <%= i cond(5.0, using: :btree) %>
53
+ t.index ["emp_no"], name: "idx_salaries_emp_no"
54
54
  end
55
55
 
56
56
  create_table "titles", id: false, force: :cascade do |t|
@@ -58,7 +58,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
58
58
  t.string "title", limit: 50, null: false
59
59
  t.date "from_date", null: false
60
60
  t.date "to_date"
61
- t.index ["emp_no"], name: "idx_titles_emp_no", <%= i cond(5.0, using: :btree) %>
61
+ t.index ["emp_no"], name: "idx_titles_emp_no"
62
62
  end
63
63
  ERB
64
64
  end
@@ -73,7 +73,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
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: "idx_dept_name", unique: true, <%= i cond(5.0, using: :btree) %>
76
+ t.index ["dept_name"], name: "idx_dept_name", unique: true
77
77
  end
78
78
 
79
79
  create_table "dept_emp", id: false, force: :cascade do |t|
@@ -81,8 +81,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
81
81
  t.string "dept_no", limit: 4, null: false
82
82
  t.date "from_date", null: false
83
83
  t.date "to_date", null: false
84
- t.index ["dept_no"], name: "idx_dept_emp_dept_no", <%= i cond(5.0, using: :btree) %>
85
- t.index ["emp_no"], name: "idx_dept_emp_emp_no", <%= i cond(5.0, using: :btree) %>
84
+ t.index ["dept_no"], name: "idx_dept_emp_dept_no"
85
+ t.index ["emp_no"], name: "idx_dept_emp_emp_no"
86
86
  end
87
87
 
88
88
  create_table "dept_manager", id: false, force: :cascade do |t|
@@ -90,8 +90,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
90
90
  t.integer "emp_no", null: false
91
91
  t.date "from_date", null: false
92
92
  t.date "to_date", null: false
93
- t.index ["dept_no"], name: "idx_dept_manager_dept_no", <%= i cond(5.0, using: :btree) %>
94
- t.index ["emp_no"], name: "idx_dept_manager_emp_no", <%= i cond(5.0, using: :btree) %>
93
+ t.index ["dept_no"], name: "idx_dept_manager_dept_no"
94
+ t.index ["emp_no"], name: "idx_dept_manager_emp_no"
95
95
  end
96
96
 
97
97
  create_table "employee_clubs", force: :cascade do |t|
@@ -111,7 +111,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
111
111
  t.integer "salary", null: false
112
112
  t.date "from_date", null: false
113
113
  t.date "to_date", null: false
114
- t.index ["emp_no"], name: "idx_salaries_emp_no", <%= i cond(5.0, using: :btree) %>
114
+ t.index ["emp_no"], name: "idx_salaries_emp_no"
115
115
  end
116
116
 
117
117
  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", limit: 255, default: "", null: false
9
- t.index ["name"], name: "idx_name", unique: true, <%= i cond(5.0, using: :btree) %>
9
+ t.index ["name"], name: "idx_name", unique: true
10
10
  end
11
11
 
12
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: "idx_dept_name", unique: true, <%= i cond(5.0, using: :btree) %>
14
+ t.index ["dept_name"], name: "idx_dept_name", unique: true
15
15
  end
16
16
 
17
17
  create_table "dept_emp", id: false, force: :cascade do |t|
@@ -19,8 +19,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
19
19
  t.string "dept_no", limit: 4, null: false
20
20
  t.date "from_date", null: false
21
21
  t.date "to_date", null: false
22
- t.index ["dept_no"], name: "idx_dept_emp_dept_no", <%= i cond(5.0, using: :btree) %>
23
- t.index ["emp_no"], name: "idx_dept_emp_emp_no", <%= i cond(5.0, using: :btree) %>
22
+ t.index ["dept_no"], name: "idx_dept_emp_dept_no"
23
+ t.index ["emp_no"], name: "idx_dept_emp_emp_no"
24
24
  end
25
25
 
26
26
  create_table "dept_manager", 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: "idx_dept_manager_dept_no", <%= i cond(5.0, using: :btree) %>
32
- t.index ["emp_no"], name: "idx_dept_manager_emp_no", <%= i cond(5.0, using: :btree) %>
31
+ t.index ["dept_no"], name: "idx_dept_manager_dept_no"
32
+ t.index ["emp_no"], name: "idx_dept_manager_emp_no"
33
33
  end
34
34
 
35
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_employee_clubs_emp_no_club_id", <%= i cond(5.0, using: :btree) %>
38
+ t.index ["emp_no", "club_id"], name: "idx_employee_clubs_emp_no_club_id"
39
39
  end
40
40
 
41
41
  create_table "employees", primary_key: "emp_no", force: :cascade do |t|
@@ -50,7 +50,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
50
50
  t.integer "salary", null: false
51
51
  t.date "from_date", null: false
52
52
  t.date "to_date", null: false
53
- t.index ["emp_no"], name: "idx_salaries_emp_no", <%= i cond(5.0, using: :btree) %>
53
+ t.index ["emp_no"], name: "idx_salaries_emp_no"
54
54
  end
55
55
 
56
56
  create_table "titles", id: false, force: :cascade do |t|
@@ -58,7 +58,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
58
58
  t.string "title", limit: 50, null: false
59
59
  t.date "from_date", null: false
60
60
  t.date "to_date"
61
- t.index ["emp_no"], name: "idx_titles_emp_no", <%= i cond(5.0, using: :btree) %>
61
+ t.index ["emp_no"], name: "idx_titles_emp_no"
62
62
  end
63
63
  ERB
64
64
  end
@@ -69,7 +69,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
69
69
  erbh(<<-ERB)
70
70
  create_table "departments", primary_key: "dept_no", force: :cascade do |t|
71
71
  t.string "dept_name", limit: 40, null: false
72
- t.index ["dept_name"], name: "idx_dept_name", unique: true, <%= i cond(5.0, using: :btree) %>
72
+ t.index ["dept_name"], name: "idx_dept_name", unique: true
73
73
  end
74
74
 
75
75
  create_table "dept_emp", id: false, force: :cascade do |t|
@@ -77,8 +77,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
77
77
  t.string "dept_no", limit: 4, null: false
78
78
  t.date "from_date", null: false
79
79
  t.date "to_date", null: false
80
- t.index ["dept_no"], name: "idx_dept_emp_dept_no", <%= i cond(5.0, using: :btree) %>
81
- t.index ["emp_no"], name: "idx_dept_emp_emp_no", <%= i cond(5.0, using: :btree) %>
80
+ t.index ["dept_no"], name: "idx_dept_emp_dept_no"
81
+ t.index ["emp_no"], name: "idx_dept_emp_emp_no"
82
82
  end
83
83
 
84
84
  create_table "dept_manager", id: false, force: :cascade do |t|
@@ -86,8 +86,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
86
86
  t.integer "emp_no", null: false
87
87
  t.date "from_date", null: false
88
88
  t.date "to_date", null: false
89
- t.index ["dept_no"], name: "idx_dept_manager_dept_no", <%= i cond(5.0, using: :btree) %>
90
- t.index ["emp_no"], name: "idx_dept_manager_emp_no", <%= i cond(5.0, using: :btree) %>
89
+ t.index ["dept_no"], name: "idx_dept_manager_dept_no"
90
+ t.index ["emp_no"], name: "idx_dept_manager_emp_no"
91
91
  end
92
92
 
93
93
  create_table "salaries", id: false, force: :cascade do |t|
@@ -95,7 +95,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
95
95
  t.integer "salary", null: false
96
96
  t.date "from_date", null: false
97
97
  t.date "to_date", null: false
98
- t.index ["emp_no"], name: "idx_salaries_emp_no", <%= i cond(5.0, using: :btree) %>
98
+ t.index ["emp_no"], name: "idx_salaries_emp_no"
99
99
  end
100
100
 
101
101
  create_table "titles", id: false, force: :cascade do |t|
@@ -103,7 +103,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
103
103
  t.string "title", limit: 50, null: false
104
104
  t.date "from_date", null: false
105
105
  t.date "to_date"
106
- t.index ["emp_no"], name: "idx_titles_emp_no", <%= i cond(5.0, using: :btree) %>
106
+ t.index ["emp_no"], name: "idx_titles_emp_no"
107
107
  end
108
108
  ERB
109
109
  end