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.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +19 -1
- data/.simplecov +6 -0
- data/README.md +4 -26
- data/bin/ridgepole +0 -2
- data/lib/ridgepole/diff.rb +7 -11
- data/lib/ridgepole/dsl_parser/table_definition.rb +1 -1
- data/lib/ridgepole/version.rb +1 -1
- data/ridgepole.gemspec +2 -1
- data/spec/erb_helper.rb +1 -5
- data/spec/mysql/bigint_pk/int_pk_spec.rb +1 -1
- data/spec/mysql/collation/collation_spec.rb +14 -14
- data/spec/mysql/comment/comment_spec.rb +9 -9
- data/spec/mysql/diff/diff2_spec.rb +5 -5
- data/spec/mysql/diff/diff_spec.rb +3 -3
- data/spec/mysql/dump/dump_class_method_spec.rb +12 -12
- data/spec/mysql/dump/dump_some_tables_spec.rb +4 -4
- data/spec/mysql/dump/dump_spec.rb +12 -12
- data/spec/mysql/dump/dump_unknown_column_type_spec.rb +2 -2
- data/spec/mysql/dump/dump_without_table_options_spec.rb +1 -1
- data/spec/mysql/fk/migrate_change_fk2_spec.rb +2 -2
- data/spec/mysql/fk/migrate_change_fk_spec.rb +20 -20
- data/spec/mysql/fk/migrate_create_fk_spec.rb +18 -18
- data/spec/mysql/fk/migrate_drop_fk_spec.rb +26 -26
- data/spec/mysql/fk/migrate_fk_with_column_spec.rb +16 -16
- data/spec/mysql/fk/migrate_ignore_fk_spec.rb +6 -6
- data/spec/mysql/migrate/migrate_add_column_order_spec.rb +2 -2
- data/spec/mysql/migrate/migrate_add_column_spec.rb +18 -18
- data/spec/mysql/migrate/migrate_add_column_with_alter_extra_spec.rb +21 -21
- data/spec/mysql/migrate/migrate_add_column_with_script_spec.rb +18 -18
- data/spec/mysql/migrate/migrate_change_column2_spec.rb +5 -5
- data/spec/mysql/migrate/migrate_change_column3_spec.rb +10 -10
- data/spec/mysql/migrate/migrate_change_column5_spec.rb +3 -3
- data/spec/mysql/migrate/migrate_change_column6_spec.rb +7 -7
- data/spec/mysql/migrate/migrate_change_column_default_spec.rb +2 -14
- data/spec/mysql/migrate/migrate_change_column_spec.rb +21 -21
- data/spec/mysql/migrate/migrate_change_index2_spec.rb +5 -5
- data/spec/mysql/migrate/migrate_change_index3_spec.rb +7 -7
- data/spec/mysql/migrate/migrate_change_index4_spec.rb +6 -6
- data/spec/mysql/migrate/migrate_change_index5_spec.rb +4 -4
- data/spec/mysql/migrate/migrate_change_index6_spec.rb +27 -27
- data/spec/mysql/migrate/migrate_change_index7_spec.rb +4 -4
- data/spec/mysql/migrate/migrate_change_index8_spec.rb +4 -4
- data/spec/mysql/migrate/migrate_change_index_spec.rb +27 -27
- data/spec/mysql/migrate/migrate_check_relation_column_type_spec.rb +1 -1
- data/spec/mysql/migrate/migrate_create_index2_spec.rb +24 -24
- data/spec/mysql/migrate/migrate_create_index_spec.rb +18 -18
- data/spec/mysql/migrate/migrate_create_table_spec.rb +16 -16
- data/spec/mysql/migrate/migrate_create_table_with_ignore_spec.rb +4 -4
- data/spec/mysql/migrate/migrate_create_table_with_index_spec.rb +4 -4
- data/spec/mysql/migrate/migrate_create_table_with_script_spec.rb +16 -16
- data/spec/mysql/migrate/migrate_drop_column_and_index2_spec.rb +18 -18
- data/spec/mysql/migrate/migrate_drop_column_and_index_spec.rb +16 -16
- data/spec/mysql/migrate/migrate_drop_column_and_unique_index_spec.rb +1 -1
- data/spec/mysql/migrate/migrate_drop_column_spec.rb +18 -18
- data/spec/mysql/migrate/migrate_drop_index_spec.rb +15 -15
- data/spec/mysql/migrate/migrate_drop_table_spec.rb +16 -16
- data/spec/mysql/migrate/migrate_empty_spec.rb +9 -9
- data/spec/mysql/migrate/migrate_execute_spec.rb +32 -32
- data/spec/mysql/migrate/migrate_ignore_column_spec.rb +4 -4
- data/spec/mysql/migrate/migrate_ignore_index_spec.rb +5 -5
- data/spec/mysql/migrate/migrate_log_file_spec.rb +16 -16
- data/spec/mysql/migrate/migrate_merge_mode_spec.rb +18 -18
- data/spec/mysql/migrate/migrate_noop_spec.rb +12 -12
- data/spec/mysql/migrate/migrate_primary_key_spec.rb +1 -1
- data/spec/mysql/migrate/migrate_rename_column_spec.rb +18 -18
- data/spec/mysql/migrate/migrate_rename_table_spec.rb +22 -22
- data/spec/mysql/migrate/migrate_same_spec.rb +12 -12
- data/spec/mysql/migrate/migrate_skip_column_comment_change_spec.rb +2 -2
- data/spec/mysql/migrate/migrate_skip_drop_table_spec.rb +18 -18
- data/spec/mysql/migrate/migrate_skip_rename_column_spec.rb +18 -18
- data/spec/mysql/migrate/migrate_skip_rename_table_spec.rb +18 -18
- data/spec/mysql/migrate/migrate_with_pre_post_query_spec.rb +18 -18
- data/spec/mysql/text_blob_types/text_blob_types_spec.rb +1 -1
- data/spec/mysql/~default_name_fk/migrate_change_fk_spec.rb +6 -6
- data/spec/mysql/~default_name_fk/migrate_create_fk_spec.rb +9 -9
- data/spec/mysql/~default_name_fk/migrate_drop_fk_spec.rb +8 -8
- data/spec/mysql/~dump_auto_increment/migrate_create_table_with_index_spec.rb +5 -5
- data/spec/mysql57/json/add_json_column_spec.rb +2 -2
- data/spec/mysql57/json/change_json_column_spec.rb +6 -6
- data/spec/mysql57/json/drop_json_column_spec.rb +2 -2
- data/spec/mysql57/virtual/add_virtual_column_spec.rb +1 -1
- data/spec/mysql57/virtual/change_virtual_column_spec.rb +1 -1
- data/spec/mysql57/virtual/drop_virtual_column_spec.rb +1 -1
- data/spec/postgresql/dump/dump_spec.rb +12 -12
- data/spec/postgresql/fk/migrate_change_fk_spec.rb +6 -6
- data/spec/postgresql/fk/migrate_create_fk_spec.rb +5 -5
- data/spec/postgresql/fk/migrate_drop_fk_spec.rb +8 -8
- data/spec/postgresql/migrate/migrate_add_column_spec.rb +16 -16
- data/spec/postgresql/migrate/migrate_add_expression_index_spec.rb +1 -1
- data/spec/postgresql/migrate/migrate_change_column_spec.rb +16 -16
- data/spec/postgresql/migrate/migrate_change_index_spec.rb +18 -18
- data/spec/postgresql/migrate/migrate_check_relation_column_type_spec.rb +1 -1
- data/spec/postgresql/migrate/migrate_create_table_spec.rb +14 -14
- data/spec/postgresql/migrate/migrate_drop_column_spec.rb +18 -18
- data/spec/postgresql/migrate/migrate_drop_column_with_index_spec.rb +17 -17
- data/spec/postgresql/migrate/migrate_drop_expression_index_spec.rb +3 -3
- data/spec/postgresql/migrate/migrate_drop_index_spec.rb +15 -15
- data/spec/postgresql/migrate/migrate_drop_table_spec.rb +16 -16
- data/spec/postgresql/migrate/migrate_primary_key2_spec.rb +1 -1
- data/spec/postgresql/migrate/migrate_primary_key_spec.rb +1 -1
- data/spec/postgresql/migrate/migrate_references_spec.rb +6 -6
- data/spec/postgresql/migrate/migrate_rename_column_spec.rb +18 -18
- data/spec/postgresql/migrate/migrate_rename_table_spec.rb +20 -20
- data/spec/postgresql/migrate/migrate_same_spec.rb +12 -12
- data/spec/postgresql/~default_name_fk/migrate_change_fk_spec.rb +3 -3
- data/spec/postgresql/~default_name_fk/migrate_create_fk_spec.rb +4 -4
- data/spec/postgresql/~default_name_fk/migrate_drop_fk_spec.rb +4 -4
- data/spec/processing_for_ci.rb +13 -0
- data/spec/spec_helper.rb +1 -1
- metadata +33 -31
- data/omnibus-ridgepole/.gitignore +0 -10
- data/omnibus-ridgepole/Dockerfile.centos +0 -25
- data/omnibus-ridgepole/Dockerfile.ubuntu +0 -21
- data/omnibus-ridgepole/Gemfile +0 -24
- data/omnibus-ridgepole/README.md +0 -15
- data/omnibus-ridgepole/Rakefile +0 -38
- data/omnibus-ridgepole/config/projects/ridgepole.rb +0 -27
- data/omnibus-ridgepole/config/software/ridgepole.rb +0 -13
- data/omnibus-ridgepole/omnibus.rb +0 -54
- data/omnibus-ridgepole/package-scripts/ridgepole/postinst +0 -1
- data/omnibus-ridgepole/package-scripts/ridgepole/postrm +0 -1
- data/spec/mysql/bigint_pk/bigint_pk_spec.rb +0 -47
- data/spec/processing_for_travis.rb +0 -11
@@ -4,14 +4,14 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
4
4
|
context 'when database and definition are same' do
|
5
5
|
let(:dsl) do
|
6
6
|
erbh(<<-ERB)
|
7
|
-
create_table "clubs", <%= i cond(
|
7
|
+
create_table "clubs", <%= i cond('< 6.1', { id: :integer, unsigned: true }, { id: { type: :integer, unsigned: true } }) %>, force: :cascade do |t|
|
8
8
|
t.string "name", default: "", null: false
|
9
|
-
t.index ["name"], name: "idx_name", unique: true
|
9
|
+
t.index ["name"], name: "idx_name", unique: true
|
10
10
|
end
|
11
11
|
|
12
12
|
create_table "departments", primary_key: "dept_no", <%= i cond(">= 6.1", { id: { type: :string, limit: 4 } }, { id: :string, limit: 4 }) %>, force: :cascade do |t|
|
13
13
|
t.string "dept_name", limit: 40, null: false
|
14
|
-
t.index ["dept_name"], name: "dept_name", unique: true
|
14
|
+
t.index ["dept_name"], name: "dept_name", unique: true
|
15
15
|
end
|
16
16
|
|
17
17
|
create_table "dept_emp", primary_key: ["emp_no", "dept_no"], 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: "dept_no"
|
23
|
-
t.index ["emp_no"], name: "emp_no"
|
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", primary_key: ["emp_no", "dept_no"], force: :cascade do |t|
|
@@ -28,17 +28,17 @@ 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"
|
32
|
-
t.index ["emp_no"], name: "emp_no"
|
31
|
+
t.index ["dept_no"], name: "dept_no"
|
32
|
+
t.index ["emp_no"], name: "emp_no"
|
33
33
|
end
|
34
34
|
|
35
|
-
create_table "employee_clubs", <%= i cond(
|
35
|
+
create_table "employee_clubs", <%= i cond('< 6.1', { id: :integer, unsigned: true }, { id: { type: :integer, unsigned: true } }) %>, force: :cascade do |t|
|
36
36
|
t.integer "emp_no", null: false, unsigned: true
|
37
37
|
t.integer "club_id", null: false, unsigned: true
|
38
|
-
t.index ["emp_no", "club_id"], name: "idx_emp_no_club_id"
|
38
|
+
t.index ["emp_no", "club_id"], name: "idx_emp_no_club_id"
|
39
39
|
end
|
40
40
|
|
41
|
-
create_table "employees", primary_key: "emp_no", id: :integer,
|
41
|
+
create_table "employees", primary_key: "emp_no", id: :integer, default: nil, force: :cascade do |t|
|
42
42
|
t.date "birth_date", null: false
|
43
43
|
t.string "first_name", limit: 14, null: false
|
44
44
|
t.string "last_name", limit: 16, null: false
|
@@ -55,7 +55,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
55
55
|
t.integer "salary", null: false
|
56
56
|
t.date "from_date", null: false
|
57
57
|
t.date "to_date", null: false
|
58
|
-
t.index ["emp_no"], name: "emp_no"
|
58
|
+
t.index ["emp_no"], name: "emp_no"
|
59
59
|
end
|
60
60
|
|
61
61
|
create_table "titles", primary_key: ["emp_no", "title", "from_date"], force: :cascade do |t|
|
@@ -63,7 +63,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
63
63
|
t.string "title", limit: 50, null: false
|
64
64
|
t.date "from_date", null: false
|
65
65
|
t.date "to_date"
|
66
|
-
t.index ["emp_no"], name: "emp_no"
|
66
|
+
t.index ["emp_no"], name: "emp_no"
|
67
67
|
end
|
68
68
|
ERB
|
69
69
|
end
|
@@ -10,7 +10,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
10
10
|
t.string "last_name", limit: 16, null: false
|
11
11
|
t.string "gender", limit: 1, null: false
|
12
12
|
t.date "hire_date", null: false
|
13
|
-
t.index ["gender"], name: "gender"
|
13
|
+
t.index ["gender"], name: "gender"
|
14
14
|
end
|
15
15
|
ERB
|
16
16
|
end
|
@@ -23,7 +23,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
23
23
|
t.string "last_name", limit: 16, null: false
|
24
24
|
t.string "gender", limit: 1, null: false
|
25
25
|
t.date :hire_date, null: false
|
26
|
-
t.index :gender, name: :gender
|
26
|
+
t.index :gender, name: :gender
|
27
27
|
end
|
28
28
|
ERB
|
29
29
|
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
|
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
|
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"
|
23
|
-
t.index ["emp_no"], name: "emp_no"
|
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"
|
32
|
-
t.index ["emp_no"], name: "emp_no"
|
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"
|
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"
|
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"
|
62
|
+
t.index ["emp_no"], name: "emp_no"
|
63
63
|
end
|
64
64
|
ERB
|
65
65
|
end
|
@@ -68,7 +68,7 @@ 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
|
71
|
+
t.index ["name"], name: "idx_name", unique: true
|
72
72
|
end
|
73
73
|
|
74
74
|
create_table "clubs2", force: :cascade do |t|
|
@@ -77,7 +77,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
77
77
|
|
78
78
|
create_table "departments", primary_key: "dept_no", force: :cascade do |t|
|
79
79
|
t.string "dept_name", limit: 40, null: false
|
80
|
-
t.index ["dept_name"], name: "dept_name", unique: true
|
80
|
+
t.index ["dept_name"], name: "dept_name", unique: true
|
81
81
|
end
|
82
82
|
|
83
83
|
create_table "dept_emp", id: false, force: :cascade do |t|
|
@@ -85,8 +85,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
85
85
|
t.string "dept_no", null: false
|
86
86
|
t.date "from_date", null: false
|
87
87
|
t.date "to_date", null: false
|
88
|
-
t.index ["dept_no"], name: "dept_no"
|
89
|
-
t.index ["emp_no"], name: "emp_no"
|
88
|
+
t.index ["dept_no"], name: "dept_no"
|
89
|
+
t.index ["emp_no"], name: "emp_no"
|
90
90
|
end
|
91
91
|
|
92
92
|
create_table "dept_manager", id: false, force: :cascade do |t|
|
@@ -94,14 +94,14 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
94
94
|
t.integer "emp_no", null: false
|
95
95
|
t.date "from_date", null: false
|
96
96
|
t.date "to_date", null: false
|
97
|
-
t.index ["dept_no"], name: "dept_no"
|
98
|
-
t.index ["emp_no"], name: "emp_no"
|
97
|
+
t.index ["dept_no"], name: "dept_no"
|
98
|
+
t.index ["emp_no"], name: "emp_no"
|
99
99
|
end
|
100
100
|
|
101
101
|
create_table "employee_clubs", force: :cascade do |t|
|
102
102
|
t.integer "emp_no", null: false
|
103
103
|
t.integer "club_id", null: false
|
104
|
-
t.index ["emp_no", "club_id"], name: "idx_emp_no_club_id"
|
104
|
+
t.index ["emp_no", "club_id"], name: "idx_emp_no_club_id"
|
105
105
|
end
|
106
106
|
|
107
107
|
create_table "employees", primary_key: "emp_no", force: :cascade do |t|
|
@@ -117,7 +117,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
117
117
|
t.integer "salary", null: false
|
118
118
|
t.date "from_date", null: false
|
119
119
|
t.date "to_date", null: false
|
120
|
-
t.index ["emp_no"], name: "emp_no"
|
120
|
+
t.index ["emp_no"], name: "emp_no"
|
121
121
|
end
|
122
122
|
|
123
123
|
create_table "titles", id: false, force: :cascade do |t|
|
@@ -125,7 +125,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
125
125
|
t.string "title", limit: 50, null: false
|
126
126
|
t.date "from_date", null: false
|
127
127
|
t.date "to_date"
|
128
|
-
t.index ["emp_no"], name: "emp_no"
|
128
|
+
t.index ["emp_no"], name: "emp_no"
|
129
129
|
end
|
130
130
|
ERB
|
131
131
|
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
|
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
|
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_date2", null: false
|
21
21
|
t.date "to_date", null: false
|
22
|
-
t.index ["dept_no"], name: "dept_no"
|
23
|
-
t.index ["emp_no"], name: "emp_no"
|
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_date2", null: false
|
31
|
-
t.index ["dept_no"], name: "dept_no"
|
32
|
-
t.index ["emp_no"], name: "emp_no"
|
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"
|
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"
|
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"
|
62
|
+
t.index ["emp_no"], name: "emp_no"
|
63
63
|
end
|
64
64
|
ERB
|
65
65
|
end
|
@@ -68,12 +68,12 @@ 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
|
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
|
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|
|
@@ -81,8 +81,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
81
81
|
t.string "dept_no", null: false
|
82
82
|
t.date "from_date2", null: false, renamed_from: 'from_date'
|
83
83
|
t.date "to_date", null: false
|
84
|
-
t.index ["dept_no"], name: "dept_no"
|
85
|
-
t.index ["emp_no"], name: "emp_no"
|
84
|
+
t.index ["dept_no"], name: "dept_no"
|
85
|
+
t.index ["emp_no"], name: "emp_no"
|
86
86
|
end
|
87
87
|
|
88
88
|
create_table "dept_manager", id: false, force: :cascade do |t|
|
@@ -90,14 +90,14 @@ 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_date2", null: false, renamed_from: 'to_date'
|
93
|
-
t.index ["dept_no"], name: "dept_no"
|
94
|
-
t.index ["emp_no"], name: "emp_no"
|
93
|
+
t.index ["dept_no"], name: "dept_no"
|
94
|
+
t.index ["emp_no"], name: "emp_no"
|
95
95
|
end
|
96
96
|
|
97
97
|
create_table "employee_clubs", force: :cascade do |t|
|
98
98
|
t.integer "emp_no", null: false
|
99
99
|
t.integer "club_id", null: false
|
100
|
-
t.index ["emp_no", "club_id"], name: "idx_emp_no_club_id"
|
100
|
+
t.index ["emp_no", "club_id"], name: "idx_emp_no_club_id"
|
101
101
|
end
|
102
102
|
|
103
103
|
create_table "employees", primary_key: "emp_no", 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"
|
116
|
+
t.index ["emp_no"], name: "emp_no"
|
117
117
|
end
|
118
118
|
|
119
119
|
create_table "titles", id: false, force: :cascade do |t|
|
@@ -121,7 +121,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
121
121
|
t.string "title", limit: 50, null: false
|
122
122
|
t.date "from_date", null: false
|
123
123
|
t.date "to_date"
|
124
|
-
t.index ["emp_no"], name: "emp_no"
|
124
|
+
t.index ["emp_no"], name: "emp_no"
|
125
125
|
end
|
126
126
|
ERB
|
127
127
|
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
|
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
|
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"
|
23
|
-
t.index ["emp_no"], name: "emp_no"
|
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"
|
32
|
-
t.index ["emp_no"], name: "emp_no"
|
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"
|
38
|
+
t.index ["emp_no", "club_id"], name: "idx_emp_no_club_id"
|
39
39
|
end
|
40
40
|
|
41
41
|
create_table "employees2", 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"
|
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"
|
62
|
+
t.index ["emp_no"], name: "emp_no"
|
63
63
|
end
|
64
64
|
ERB
|
65
65
|
end
|
@@ -68,12 +68,12 @@ 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
|
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
|
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|
|
@@ -81,8 +81,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
81
81
|
t.string "dept_no", null: false
|
82
82
|
t.date "from_date", null: false
|
83
83
|
t.date "to_date", null: false
|
84
|
-
t.index ["dept_no"], name: "dept_no"
|
85
|
-
t.index ["emp_no"], name: "emp_no"
|
84
|
+
t.index ["dept_no"], name: "dept_no"
|
85
|
+
t.index ["emp_no"], name: "emp_no"
|
86
86
|
end
|
87
87
|
|
88
88
|
create_table "dept_manager", id: false, force: :cascade do |t|
|
@@ -90,14 +90,14 @@ 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: "dept_no"
|
94
|
-
t.index ["emp_no"], name: "emp_no"
|
93
|
+
t.index ["dept_no"], name: "dept_no"
|
94
|
+
t.index ["emp_no"], name: "emp_no"
|
95
95
|
end
|
96
96
|
|
97
97
|
create_table "employee_clubs", force: :cascade do |t|
|
98
98
|
t.integer "emp_no", null: false
|
99
99
|
t.integer "club_id", null: false
|
100
|
-
t.index ["emp_no", "club_id"], name: "idx_emp_no_club_id"
|
100
|
+
t.index ["emp_no", "club_id"], name: "idx_emp_no_club_id"
|
101
101
|
end
|
102
102
|
|
103
103
|
create_table "employees2", primary_key: "emp_no", force: :cascade, renamed_from: 'employees' 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"
|
116
|
+
t.index ["emp_no"], name: "emp_no"
|
117
117
|
end
|
118
118
|
|
119
119
|
create_table "titles", id: false, force: :cascade do |t|
|
@@ -121,7 +121,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
121
121
|
t.string "title", limit: 50, null: false
|
122
122
|
t.date "from_date", null: false
|
123
123
|
t.date "to_date"
|
124
|
-
t.index ["emp_no"], name: "emp_no"
|
124
|
+
t.index ["emp_no"], name: "emp_no"
|
125
125
|
end
|
126
126
|
ERB
|
127
127
|
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
|
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
|
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"
|
24
|
-
t.index ["emp_no"], name: "emp_no"
|
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"
|
33
|
-
t.index ["emp_no"], name: "emp_no"
|
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"
|
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"
|
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"
|
63
|
+
t.index ["emp_no"], name: "emp_no"
|
64
64
|
end
|
65
65
|
ERB
|
66
66
|
end
|
@@ -69,12 +69,12 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
69
69
|
erbh(<<-ERB)
|
70
70
|
create_table "clubs", force: :cascade do |t|
|
71
71
|
t.string "name", default: "", null: false
|
72
|
-
t.index ["name"], name: "idx_name", unique: true
|
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: "dept_name", unique: true
|
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"
|
86
|
-
t.index ["emp_no"], name: "emp_no"
|
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,14 +91,14 @@ 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"
|
95
|
-
t.index ["emp_no"], name: "emp_no"
|
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|
|
99
99
|
t.integer "emp_no", null: false
|
100
100
|
t.integer "club_id", null: false
|
101
|
-
t.index ["emp_no", "club_id"], name: "idx_emp_no_club_id"
|
101
|
+
t.index ["emp_no", "club_id"], name: "idx_emp_no_club_id"
|
102
102
|
end
|
103
103
|
|
104
104
|
create_table "employees", primary_key: "emp_no", force: :cascade do |t|
|
@@ -122,7 +122,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
122
122
|
t.integer "salary", null: false
|
123
123
|
t.date "from_date", null: false
|
124
124
|
t.date "to_date", null: false
|
125
|
-
t.index ["emp_no"], name: "emp_no"
|
125
|
+
t.index ["emp_no"], name: "emp_no"
|
126
126
|
end
|
127
127
|
|
128
128
|
create_table "titles", id: false, force: :cascade do |t|
|
@@ -130,7 +130,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
130
130
|
t.string "title", limit: 50, null: false
|
131
131
|
t.date "from_date", null: false
|
132
132
|
t.date "to_date"
|
133
|
-
t.index ["emp_no"], name: "emp_no"
|
133
|
+
t.index ["emp_no"], name: "emp_no"
|
134
134
|
end
|
135
135
|
ERB
|
136
136
|
end
|