ridgepole 0.4.12 → 0.5.0.beta
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/ridgepole/version.rb +1 -1
- data/ridgepole.gemspec +1 -1
- data/spec/diff/diff_spec.rb +2 -2
- data/spec/dump/dump_class_method_spec.rb +2 -2
- data/spec/dump/dump_spec.rb +2 -2
- data/spec/migrate/check_orphan_index_spec.rb +2 -2
- data/spec/migrate/migrate_add_column2_spec.rb +3 -3
- data/spec/migrate/migrate_add_column_spec.rb +12 -12
- data/spec/migrate/migrate_change_column_spec.rb +4 -4
- data/spec/migrate/migrate_change_index_spec.rb +6 -6
- data/spec/migrate/migrate_create_index_spec.rb +2 -2
- data/spec/migrate/migrate_create_table_spec.rb +2 -2
- data/spec/migrate/migrate_create_table_with_options_spec.rb +4 -4
- data/spec/migrate/migrate_drop_column_and_index_2_spec.rb +4 -4
- data/spec/migrate/migrate_drop_column_and_index_spec.rb +3 -3
- data/spec/migrate/migrate_drop_column_spec.rb +4 -4
- data/spec/migrate/migrate_drop_index_spec.rb +2 -2
- data/spec/migrate/migrate_drop_table_spec.rb +4 -4
- data/spec/migrate/migrate_empty_spec.rb +2 -2
- data/spec/migrate/migrate_execute_spec.rb +8 -8
- data/spec/migrate/migrate_merge_mode_spec.rb +4 -4
- data/spec/migrate/migrate_noop_spec.rb +28 -28
- data/spec/migrate/migrate_rename_column_spec.rb +4 -4
- data/spec/migrate/migrate_rename_table_spec.rb +4 -4
- data/spec/migrate/migrate_same_default_unsigned_spec.rb +8 -8
- data/spec/migrate/migrate_same_spec.rb +2 -2
- data/spec/migrate/migrate_script_error_spec.rb +2 -2
- data/spec/migrate/migrate_skip_rename_column_spec.rb +4 -4
- data/spec/migrate/migrate_skip_rename_table_spec.rb +4 -4
- data/spec/migrate/migrate_with_pre_post_query_spec.rb +4 -4
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f29eef499dc9a51a3c257fcad04d70b108ce6e47
|
4
|
+
data.tar.gz: c0c0b1bf6244e69e9fdf6de63724c4392031d95d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d62f6a3276fc36a895ff81b109edb23dae14433de4f62a150961c78050b20ec8deca59584ca56e034474ed8cd440dc133f66e86ca8a2a1e01b8fa49f86f2e57
|
7
|
+
data.tar.gz: 79c582b9587dffa9c4114b1b69e01af9e2a7087d6c2eda4dd168772d202cd36499efa214e228950904b79d9757fa265c1ab2dd9b0871edf1e4702221ca62c8d2
|
data/README.md
CHANGED
@@ -18,6 +18,8 @@ It defines DB schema using [Rails DSL](http://guides.rubyonrails.org/migrations.
|
|
18
18
|
* Add `--enable-mysql-pkdump` option.
|
19
19
|
* `>= 0.4.12`
|
20
20
|
* Fix `activerecord-mysql-unsigned` version: `~> 0.2.0`
|
21
|
+
* `>= 0.5.0`
|
22
|
+
* Fix `activerecord-mysql-unsigned` version: `~> 0.3.0`
|
21
23
|
|
22
24
|
## Installation
|
23
25
|
|
data/lib/ridgepole/version.rb
CHANGED
data/ridgepole.gemspec
CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.add_development_dependency 'rspec', '>= 3.0.0'
|
25
25
|
spec.add_development_dependency 'mysql2'
|
26
26
|
spec.add_development_dependency 'coveralls'
|
27
|
-
spec.add_development_dependency 'activerecord-mysql-unsigned', '~> 0.
|
27
|
+
spec.add_development_dependency 'activerecord-mysql-unsigned', '~> 0.3.1'
|
28
28
|
spec.add_development_dependency 'foreigner'
|
29
29
|
spec.add_development_dependency 'activerecord-mysql-pkdump', '>= 0.1.0'
|
30
30
|
end
|
data/spec/diff/diff_spec.rb
CHANGED
@@ -35,8 +35,8 @@ describe 'Ridgepole::Client.diff' do
|
|
35
35
|
add_index "dept_manager", ["emp_no"], name: "emp_no", using: :btree
|
36
36
|
|
37
37
|
create_table "employee_clubs", force: true do |t|
|
38
|
-
t.integer "emp_no",
|
39
|
-
t.integer "club_id",
|
38
|
+
t.integer "emp_no", null: false, unsigned: true
|
39
|
+
t.integer "club_id", null: false, unsigned: true
|
40
40
|
end
|
41
41
|
|
42
42
|
add_index "employee_clubs", ["emp_no", "club_id"], name: "idx_emp_no_club_id", using: :btree
|
@@ -38,8 +38,8 @@ describe 'Ridgepole::Client.dump' do
|
|
38
38
|
add_index "dept_manager", ["emp_no"], name: "emp_no", using: :btree
|
39
39
|
|
40
40
|
create_table "employee_clubs", force: true do |t|
|
41
|
-
t.integer "emp_no",
|
42
|
-
t.integer "club_id",
|
41
|
+
t.integer "emp_no", null: false, unsigned: true
|
42
|
+
t.integer "club_id", null: false, unsigned: true
|
43
43
|
end
|
44
44
|
|
45
45
|
add_index "employee_clubs", ["emp_no", "club_id"], name: "idx_emp_no_club_id", using: :btree
|
data/spec/dump/dump_spec.rb
CHANGED
@@ -38,8 +38,8 @@ describe 'Ridgepole::Client#dump' do
|
|
38
38
|
add_index "dept_manager", ["emp_no"], name: "emp_no", using: :btree
|
39
39
|
|
40
40
|
create_table "employee_clubs", force: true do |t|
|
41
|
-
t.integer "emp_no",
|
42
|
-
t.integer "club_id",
|
41
|
+
t.integer "emp_no", null: false, unsigned: true
|
42
|
+
t.integer "club_id", null: false, unsigned: true
|
43
43
|
end
|
44
44
|
|
45
45
|
add_index "employee_clubs", ["emp_no", "club_id"], name: "idx_emp_no_club_id", using: :btree
|
@@ -36,8 +36,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
36
36
|
add_index "Xdept_manager", ["emp_no"], name: "emp_no", using: :btree
|
37
37
|
|
38
38
|
create_table "employee_clubs", force: true do |t|
|
39
|
-
t.integer "emp_no",
|
40
|
-
t.integer "club_id",
|
39
|
+
t.integer "emp_no", null: false, unsigned: true
|
40
|
+
t.integer "club_id", null: false, unsigned: true
|
41
41
|
end
|
42
42
|
|
43
43
|
add_index "employee_clubs", ["emp_no", "club_id"], name: "idx_emp_no_club_id", using: :btree
|
@@ -35,7 +35,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
35
35
|
expect(subject.dump).to eq actual_dsl.strip_heredoc.strip
|
36
36
|
|
37
37
|
sql = sql.each_line.map {|i| i.strip }.join("\n")
|
38
|
-
expect(sql).to eq("ALTER TABLE `dept_emp` ADD `emp_no2` int
|
38
|
+
expect(sql).to eq("ALTER TABLE `dept_emp` ADD `emp_no2` int NOT NULL AFTER `emp_no`")
|
39
39
|
}
|
40
40
|
end
|
41
41
|
|
@@ -75,7 +75,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
75
75
|
expect(subject.dump).to eq actual_dsl.strip_heredoc.strip
|
76
76
|
|
77
77
|
sql = sql.each_line.map {|i| i.strip }.join("\n")
|
78
|
-
expect(sql).to eq("ALTER TABLE `dept_emp` ADD `emp_no2` int
|
78
|
+
expect(sql).to eq("ALTER TABLE `dept_emp` ADD `emp_no2` int NOT NULL AFTER `emp_no`")
|
79
79
|
}
|
80
80
|
end
|
81
81
|
|
@@ -115,7 +115,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
115
115
|
expect(subject.dump).to eq actual_dsl.strip_heredoc.strip
|
116
116
|
|
117
117
|
sql = sql.each_line.map {|i| i.strip }.join("\n")
|
118
|
-
expect(sql).to eq("ALTER TABLE `dept_emp` ADD `emp_no2` int
|
118
|
+
expect(sql).to eq("ALTER TABLE `dept_emp` ADD `emp_no2` int NOT NULL AFTER `emp_no`")
|
119
119
|
}
|
120
120
|
end
|
121
121
|
end
|
@@ -35,8 +35,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
35
35
|
add_index "dept_manager", ["emp_no"], name: "emp_no", using: :btree
|
36
36
|
|
37
37
|
create_table "employee_clubs", force: true do |t|
|
38
|
-
t.integer "emp_no",
|
39
|
-
t.integer "club_id",
|
38
|
+
t.integer "emp_no", null: false, unsigned: true
|
39
|
+
t.integer "club_id", null: false, unsigned: true
|
40
40
|
end
|
41
41
|
|
42
42
|
add_index "employee_clubs", ["emp_no", "club_id"], name: "idx_emp_no_club_id", using: :btree
|
@@ -104,20 +104,20 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
104
104
|
add_index "dept_manager", ["emp_no"], name: "emp_no", using: :btree
|
105
105
|
|
106
106
|
create_table "employee_clubs", force: true do |t|
|
107
|
-
t.integer "emp_no",
|
108
|
-
t.integer "club_id",
|
109
|
-
t.string "any_col",
|
107
|
+
t.integer "emp_no", null: false, unsigned: true
|
108
|
+
t.integer "club_id", null: false, unsigned: true
|
109
|
+
t.string "any_col", null: false
|
110
110
|
end
|
111
111
|
|
112
112
|
add_index "employee_clubs", ["emp_no", "club_id"], name: "idx_emp_no_club_id", using: :btree
|
113
113
|
|
114
114
|
create_table "employees", primary_key: "emp_no", force: true do |t|
|
115
|
-
t.date "birth_date",
|
116
|
-
t.string "first_name", limit: 14,
|
117
|
-
t.string "last_name", limit: 16,
|
118
|
-
t.string "gender", limit: 1,
|
119
|
-
t.date "hire_date",
|
120
|
-
t.integer "age",
|
115
|
+
t.date "birth_date", null: false
|
116
|
+
t.string "first_name", limit: 14, null: false
|
117
|
+
t.string "last_name", limit: 16, null: false
|
118
|
+
t.string "gender", limit: 1, null: false
|
119
|
+
t.date "hire_date", null: false
|
120
|
+
t.integer "age", null: false, unsigned: true
|
121
121
|
t.date "updated_at"
|
122
122
|
end
|
123
123
|
|
@@ -173,7 +173,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
173
173
|
end
|
174
174
|
|
175
175
|
change_table("employees", {:bulk => true}) do |t|
|
176
|
-
t.column("age", :integer, {:
|
176
|
+
t.column("age", :integer, {:null=>false, :unsigned=>true, :after=>"hire_date"})
|
177
177
|
t.column("updated_at", :date, {:after=>"age"})
|
178
178
|
end
|
179
179
|
RUBY
|
@@ -35,8 +35,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
35
35
|
add_index "dept_manager", ["emp_no"], name: "emp_no", using: :btree
|
36
36
|
|
37
37
|
create_table "employee_clubs", force: true do |t|
|
38
|
-
t.integer "emp_no",
|
39
|
-
t.integer "club_id",
|
38
|
+
t.integer "emp_no", null: false, unsigned: true
|
39
|
+
t.integer "club_id", null: false, unsigned: true
|
40
40
|
end
|
41
41
|
|
42
42
|
add_index "employee_clubs", ["emp_no", "club_id"], name: "idx_emp_no_club_id", using: :btree
|
@@ -104,7 +104,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
104
104
|
add_index "dept_manager", ["emp_no"], name: "emp_no", using: :btree
|
105
105
|
|
106
106
|
create_table "employee_clubs", force: true do |t|
|
107
|
-
t.integer "emp_no",
|
107
|
+
t.integer "emp_no", null: false, unsigned: true
|
108
108
|
t.integer "club_id", unsigned: false, null: true
|
109
109
|
end
|
110
110
|
|
@@ -153,7 +153,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
153
153
|
delta = Ridgepole::Client.diff(actual_dsl, expected_dsl, reverse: true, enable_mysql_unsigned: true)
|
154
154
|
expect(delta.differ?).to be_truthy
|
155
155
|
expect(delta.script).to eq <<-RUBY.strip_heredoc.strip
|
156
|
-
change_column("employee_clubs", "club_id", :integer, {:
|
156
|
+
change_column("employee_clubs", "club_id", :integer, {:null=>false, :unsigned=>true})
|
157
157
|
|
158
158
|
change_column("employees", "last_name", :string, {:limit=>16, :null=>false, :unsigned=>false})
|
159
159
|
change_column("employees", "gender", :string, {:limit=>1, :null=>false, :unsigned=>false})
|
@@ -35,8 +35,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
35
35
|
add_index "dept_manager", ["emp_no"], name: "emp_no", using: :btree
|
36
36
|
|
37
37
|
create_table "employee_clubs", force: true do |t|
|
38
|
-
t.integer "emp_no",
|
39
|
-
t.integer "club_id",
|
38
|
+
t.integer "emp_no", null: false, unsigned: true
|
39
|
+
t.integer "club_id", null: false, unsigned: true
|
40
40
|
end
|
41
41
|
|
42
42
|
add_index "employee_clubs", ["emp_no", "club_id"], name: "idx_emp_no_club_id", using: :btree
|
@@ -104,8 +104,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
104
104
|
add_index "dept_manager", ["emp_no"], name: "emp_no", using: :btree
|
105
105
|
|
106
106
|
create_table "employee_clubs", force: true do |t|
|
107
|
-
t.integer "emp_no",
|
108
|
-
t.integer "club_id",
|
107
|
+
t.integer "emp_no", null: false, unsigned: true
|
108
|
+
t.integer "club_id", null: false, unsigned: true
|
109
109
|
end
|
110
110
|
|
111
111
|
add_index "employee_clubs", ["emp_no", "club_id"], name: "idx_emp_no_club_id", using: :btree
|
@@ -173,8 +173,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
173
173
|
add_index "dept_manager", ["from_date"], name: "emp_no", using: :btree
|
174
174
|
|
175
175
|
create_table "employee_clubs", force: true do |t|
|
176
|
-
t.integer "emp_no",
|
177
|
-
t.integer "club_id",
|
176
|
+
t.integer "emp_no", null: false, unsigned: true
|
177
|
+
t.integer "club_id", null: false, unsigned: true
|
178
178
|
end
|
179
179
|
|
180
180
|
add_index "employee_clubs", ["emp_no", "club_id"], name: "idx_emp_no_club_id", using: :btree
|
@@ -35,8 +35,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
35
35
|
add_index "dept_manager", ["emp_no"], name: "emp_no", using: :btree
|
36
36
|
|
37
37
|
create_table "employee_clubs", force: true do |t|
|
38
|
-
t.integer "emp_no",
|
39
|
-
t.integer "club_id",
|
38
|
+
t.integer "emp_no", null: false, unsigned: true
|
39
|
+
t.integer "club_id", null: false, unsigned: true
|
40
40
|
end
|
41
41
|
|
42
42
|
add_index "employee_clubs", ["emp_no", "club_id"], name: "idx_emp_no_club_id", using: :btree
|
@@ -35,8 +35,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
35
35
|
add_index "dept_manager", ["emp_no"], name: "emp_no", using: :btree
|
36
36
|
|
37
37
|
create_table "employee_clubs", force: true do |t|
|
38
|
-
t.integer "emp_no",
|
39
|
-
t.integer "club_id",
|
38
|
+
t.integer "emp_no", null: false, unsigned: true
|
39
|
+
t.integer "club_id", null: false, unsigned: true
|
40
40
|
end
|
41
41
|
|
42
42
|
add_index "employee_clubs", ["emp_no", "club_id"], name: "idx_emp_no_club_id", using: :btree
|
@@ -3,8 +3,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
3
3
|
let(:expected_dsl) {
|
4
4
|
<<-RUBY
|
5
5
|
create_table "employee_clubs", force: true do |t|
|
6
|
-
t.integer "emp_no",
|
7
|
-
t.integer "club_id",
|
6
|
+
t.integer "emp_no", null: false, unsigned: true
|
7
|
+
t.integer "club_id", null: false, unsigned: true
|
8
8
|
end
|
9
9
|
|
10
10
|
add_index "employee_clubs", ["emp_no", "club_id"], name: "idx_emp_no_club_id", using: :btree
|
@@ -19,8 +19,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
19
19
|
|
20
20
|
expect(delta.script).to eq <<-RUBY.strip_heredoc.strip
|
21
21
|
create_table("employee_clubs", {:options=>"ENGINE=MyISAM CHARSET=utf8"}) do |t|
|
22
|
-
t.integer("emp_no", {:
|
23
|
-
t.integer("club_id", {:
|
22
|
+
t.integer("emp_no", {:null=>false, :unsigned=>true})
|
23
|
+
t.integer("club_id", {:null=>false, :unsigned=>true})
|
24
24
|
end
|
25
25
|
add_index("employee_clubs", ["emp_no", "club_id"], {:name=>"idx_emp_no_club_id", :using=>:btree})
|
26
26
|
RUBY
|
@@ -35,8 +35,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
35
35
|
add_index "dept_manager", ["emp_no"], name: "emp_no", using: :btree
|
36
36
|
|
37
37
|
create_table "employee_clubs", force: true do |t|
|
38
|
-
t.integer "emp_no",
|
39
|
-
t.integer "club_id",
|
38
|
+
t.integer "emp_no", null: false, unsigned: true
|
39
|
+
t.integer "club_id", null: false, unsigned: true
|
40
40
|
end
|
41
41
|
|
42
42
|
add_index "employee_clubs", ["emp_no", "club_id"], name: "idx_emp_no_club_id", using: :btree
|
@@ -98,8 +98,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
98
98
|
add_index "dept_manager", ["dept_no"], name: "dept_no", using: :btree
|
99
99
|
|
100
100
|
create_table "employee_clubs", force: true do |t|
|
101
|
-
t.integer "emp_no",
|
102
|
-
t.integer "club_id2",
|
101
|
+
t.integer "emp_no", null: false, unsigned: true
|
102
|
+
t.integer "club_id2", null: false, unsigned: true
|
103
103
|
end
|
104
104
|
|
105
105
|
add_index "employee_clubs", ["emp_no", "club_id2"], name: "idx_emp_no_club_id2", using: :btree
|
@@ -35,8 +35,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
35
35
|
add_index "dept_manager", ["emp_no"], name: "emp_no", using: :btree
|
36
36
|
|
37
37
|
create_table "employee_clubs", force: true do |t|
|
38
|
-
t.integer "emp_no",
|
39
|
-
t.integer "club_id",
|
38
|
+
t.integer "emp_no", null: false, unsigned: true
|
39
|
+
t.integer "club_id", null: false, unsigned: true
|
40
40
|
end
|
41
41
|
|
42
42
|
add_index "employee_clubs", ["emp_no", "club_id"], name: "idx_emp_no_club_id", using: :btree
|
@@ -96,7 +96,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
96
96
|
add_index "dept_manager", ["dept_no"], name: "dept_no", using: :btree
|
97
97
|
|
98
98
|
create_table "employee_clubs", force: true do |t|
|
99
|
-
t.integer "emp_no",
|
99
|
+
t.integer "emp_no", null: false, unsigned: true
|
100
100
|
end
|
101
101
|
|
102
102
|
add_index "employee_clubs", ["emp_no"], name: "idx_emp_no_club_id", using: :btree
|
@@ -35,8 +35,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
35
35
|
add_index "dept_manager", ["emp_no"], name: "emp_no", using: :btree
|
36
36
|
|
37
37
|
create_table "employee_clubs", force: true do |t|
|
38
|
-
t.integer "emp_no",
|
39
|
-
t.integer "club_id",
|
38
|
+
t.integer "emp_no", null: false, unsigned: true
|
39
|
+
t.integer "club_id", null: false, unsigned: true
|
40
40
|
end
|
41
41
|
|
42
42
|
add_index "employee_clubs", ["emp_no", "club_id"], name: "idx_emp_no_club_id", using: :btree
|
@@ -100,8 +100,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
100
100
|
add_index "dept_manager", ["emp_no"], name: "emp_no", using: :btree
|
101
101
|
|
102
102
|
create_table "employee_clubs", force: true do |t|
|
103
|
-
t.integer "emp_no",
|
104
|
-
t.integer "club_id",
|
103
|
+
t.integer "emp_no", null: false, unsigned: true
|
104
|
+
t.integer "club_id", null: false, unsigned: true
|
105
105
|
end
|
106
106
|
|
107
107
|
add_index "employee_clubs", ["emp_no", "club_id"], name: "idx_emp_no_club_id", using: :btree
|
@@ -35,8 +35,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
35
35
|
add_index "dept_manager", ["emp_no"], name: "emp_no", using: :btree
|
36
36
|
|
37
37
|
create_table "employee_clubs", force: true do |t|
|
38
|
-
t.integer "emp_no",
|
39
|
-
t.integer "club_id",
|
38
|
+
t.integer "emp_no", null: false, unsigned: true
|
39
|
+
t.integer "club_id", null: false, unsigned: true
|
40
40
|
end
|
41
41
|
|
42
42
|
add_index "employee_clubs", ["emp_no", "club_id"], name: "idx_emp_no_club_id", using: :btree
|
@@ -35,8 +35,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
35
35
|
add_index "dept_manager", ["emp_no"], name: "emp_no", using: :btree
|
36
36
|
|
37
37
|
create_table "employee_clubs", force: true do |t|
|
38
|
-
t.integer "emp_no",
|
39
|
-
t.integer "club_id",
|
38
|
+
t.integer "emp_no", null: false, unsigned: true
|
39
|
+
t.integer "club_id", null: false, unsigned: true
|
40
40
|
end
|
41
41
|
|
42
42
|
add_index "employee_clubs", ["emp_no", "club_id"], name: "idx_emp_no_club_id", using: :btree
|
@@ -98,8 +98,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
98
98
|
add_index("clubs", ["name"], {:name=>"idx_name", :unique=>true, :using=>:btree})
|
99
99
|
|
100
100
|
create_table("employee_clubs", {}) do |t|
|
101
|
-
t.integer("emp_no", {:
|
102
|
-
t.integer("club_id", {:
|
101
|
+
t.integer("emp_no", {:null=>false, :unsigned=>true})
|
102
|
+
t.integer("club_id", {:null=>false, :unsigned=>true})
|
103
103
|
end
|
104
104
|
add_index("employee_clubs", ["emp_no", "club_id"], {:name=>"idx_emp_no_club_id", :using=>:btree})
|
105
105
|
|
@@ -36,8 +36,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
36
36
|
add_index "dept_manager", ["emp_no"], name: "emp_no", using: :btree
|
37
37
|
|
38
38
|
create_table "employee_clubs", force: true do |t|
|
39
|
-
t.integer "emp_no",
|
40
|
-
t.integer "club_id",
|
39
|
+
t.integer "emp_no", null: false, unsigned: true
|
40
|
+
t.integer "club_id", null: false, unsigned: true
|
41
41
|
end
|
42
42
|
|
43
43
|
add_index "employee_clubs", ["emp_no", "club_id"], name: "idx_emp_no_club_id", using: :btree
|
@@ -7,8 +7,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
7
7
|
end
|
8
8
|
|
9
9
|
create_table "books", force: true do |t|
|
10
|
-
t.string "title",
|
11
|
-
t.integer "author_id",
|
10
|
+
t.string "title", null: false
|
11
|
+
t.integer "author_id", null: false, unsigned: true
|
12
12
|
end
|
13
13
|
|
14
14
|
add_index "books", ["author_id"], name: "idx_author_id", using: :btree
|
@@ -76,8 +76,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
76
76
|
end
|
77
77
|
|
78
78
|
create_table "books", force: true do |t|
|
79
|
-
t.string "title",
|
80
|
-
t.integer "author_id",
|
79
|
+
t.string "title", null: false
|
80
|
+
t.integer "author_id", null: false, unsigned: true
|
81
81
|
end
|
82
82
|
|
83
83
|
add_index "books", ["author_id"], name: "idx_author_id", using: :btree
|
@@ -147,8 +147,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
147
147
|
end
|
148
148
|
|
149
149
|
create_table "books", force: true do |t|
|
150
|
-
t.string "title",
|
151
|
-
t.integer "author_id",
|
150
|
+
t.string "title", null: false
|
151
|
+
t.integer "author_id", null: false, unsigned: true
|
152
152
|
end
|
153
153
|
|
154
154
|
add_index "books", ["author_id"], name: "idx_author_id", using: :btree
|
@@ -218,8 +218,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
218
218
|
end
|
219
219
|
|
220
220
|
create_table "books", force: true do |t|
|
221
|
-
t.string "title",
|
222
|
-
t.integer "author_id",
|
221
|
+
t.string "title", null: false
|
222
|
+
t.integer "author_id", null: false, unsigned: true
|
223
223
|
end
|
224
224
|
|
225
225
|
add_index "books", ["author_id"], name: "idx_author_id", using: :btree
|
@@ -35,8 +35,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
35
35
|
add_index "dept_manager", ["emp_no"], name: "emp_no", using: :btree
|
36
36
|
|
37
37
|
create_table "employee_clubs", force: true do |t|
|
38
|
-
t.integer "emp_no",
|
39
|
-
t.integer "club_id",
|
38
|
+
t.integer "emp_no", null: false, unsigned: true
|
39
|
+
t.integer "club_id", null: false, unsigned: true
|
40
40
|
end
|
41
41
|
|
42
42
|
add_index "employee_clubs", ["emp_no", "club_id"], name: "idx_emp_no_club_id", using: :btree
|
@@ -108,8 +108,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
108
108
|
add_index "dept_manager", ["emp_no"], name: "emp_no", using: :btree
|
109
109
|
|
110
110
|
create_table "employee_clubs", force: true do |t|
|
111
|
-
t.integer "emp_no",
|
112
|
-
t.integer "club_id",
|
111
|
+
t.integer "emp_no", null: false, unsigned: true
|
112
|
+
t.integer "club_id", null: false, unsigned: true
|
113
113
|
end
|
114
114
|
|
115
115
|
add_index "employee_clubs", ["emp_no", "club_id"], name: "idx_emp_no_club_id", using: :btree
|
@@ -36,8 +36,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
36
36
|
add_index "dept_manager", ["emp_no"], name: "emp_no", using: :btree
|
37
37
|
|
38
38
|
create_table "employee_clubs", force: true do |t|
|
39
|
-
t.integer "emp_no",
|
40
|
-
t.integer "club_id",
|
39
|
+
t.integer "emp_no", null: false, unsigned: true
|
40
|
+
t.integer "club_id", null: false, unsigned: true
|
41
41
|
end
|
42
42
|
|
43
43
|
add_index "employee_clubs", ["emp_no", "club_id"], name: "idx_emp_no_club_id", using: :btree
|
@@ -82,22 +82,22 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
82
82
|
sql = sql.each_line.map {|i| i.strip }.join("\n")
|
83
83
|
|
84
84
|
expect(sql).to eq <<-SQL.strip_heredoc.strip
|
85
|
-
CREATE TABLE `clubs` (`id` int
|
85
|
+
CREATE TABLE `clubs` (`id` int unsigned auto_increment PRIMARY KEY, `name` varchar(255) DEFAULT '' NOT NULL) ENGINE=InnoDB
|
86
86
|
CREATE UNIQUE INDEX `idx_name` USING btree ON `clubs` (`name`)
|
87
|
-
CREATE TABLE `departments` (`dept_no` int
|
87
|
+
CREATE TABLE `departments` (`dept_no` int unsigned auto_increment PRIMARY KEY, `dept_name` varchar(40) NOT NULL) ENGINE=InnoDB
|
88
88
|
CREATE UNIQUE INDEX `dept_name` USING btree ON `departments` (`dept_name`)
|
89
|
-
CREATE TABLE `dept_emp` (`emp_no` int
|
89
|
+
CREATE TABLE `dept_emp` (`emp_no` int NOT NULL, `dept_no` varchar(4) NOT NULL, `from_date` date NOT NULL, `to_date` date NOT NULL) ENGINE=InnoDB
|
90
90
|
CREATE INDEX `dept_no` USING btree ON `dept_emp` (`dept_no`)
|
91
91
|
CREATE INDEX `emp_no` USING btree ON `dept_emp` (`emp_no`)
|
92
|
-
CREATE TABLE `dept_manager` (`dept_no` varchar(4) NOT NULL, `emp_no` int
|
92
|
+
CREATE TABLE `dept_manager` (`dept_no` varchar(4) NOT NULL, `emp_no` int NOT NULL, `from_date` date NOT NULL, `to_date` date NOT NULL) ENGINE=InnoDB
|
93
93
|
CREATE INDEX `dept_no` USING btree ON `dept_manager` (`dept_no`)
|
94
94
|
CREATE INDEX `emp_no` USING btree ON `dept_manager` (`emp_no`)
|
95
|
-
CREATE TABLE `employee_clubs` (`id` int
|
95
|
+
CREATE TABLE `employee_clubs` (`id` int unsigned auto_increment PRIMARY KEY, `emp_no` int unsigned NOT NULL, `club_id` int unsigned NOT NULL) ENGINE=InnoDB
|
96
96
|
CREATE INDEX `idx_emp_no_club_id` USING btree ON `employee_clubs` (`emp_no`, `club_id`)
|
97
|
-
CREATE TABLE `employees` (`emp_no` int
|
98
|
-
CREATE TABLE `salaries` (`emp_no` int
|
97
|
+
CREATE TABLE `employees` (`emp_no` int unsigned auto_increment PRIMARY KEY, `birth_date` date NOT NULL, `first_name` varchar(14) NOT NULL, `last_name` varchar(16) NOT NULL, `gender` varchar(1) NOT NULL, `hire_date` date NOT NULL) ENGINE=InnoDB
|
98
|
+
CREATE TABLE `salaries` (`emp_no` int NOT NULL, `salary` int NOT NULL, `from_date` date NOT NULL, `to_date` date NOT NULL) ENGINE=InnoDB
|
99
99
|
CREATE INDEX `emp_no` USING btree ON `salaries` (`emp_no`)
|
100
|
-
CREATE TABLE `titles` (`emp_no` int
|
100
|
+
CREATE TABLE `titles` (`emp_no` int NOT NULL, `title` varchar(50) NOT NULL, `from_date` date NOT NULL, `to_date` date) ENGINE=InnoDB
|
101
101
|
CREATE INDEX `emp_no` USING btree ON `titles` (`emp_no`)
|
102
102
|
SQL
|
103
103
|
}
|
@@ -112,20 +112,20 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
112
112
|
sql = sql.each_line.map {|i| i.strip }.join("\n")
|
113
113
|
|
114
114
|
expect(sql).to eq <<-SQL.strip_heredoc.strip
|
115
|
-
CREATE TABLE `clubs` (`id` int
|
115
|
+
CREATE TABLE `clubs` (`id` int unsigned auto_increment PRIMARY KEY, `name` varchar(255) DEFAULT '' NOT NULL) ENGINE=InnoDB
|
116
116
|
ALTER TABLE `clubs` ADD UNIQUE INDEX idx_name (`name`)
|
117
|
-
CREATE TABLE `departments` (`dept_no` int
|
117
|
+
CREATE TABLE `departments` (`dept_no` int unsigned auto_increment PRIMARY KEY, `dept_name` varchar(40) NOT NULL) ENGINE=InnoDB
|
118
118
|
ALTER TABLE `departments` ADD UNIQUE INDEX dept_name (`dept_name`)
|
119
|
-
CREATE TABLE `dept_emp` (`emp_no` int
|
119
|
+
CREATE TABLE `dept_emp` (`emp_no` int NOT NULL, `dept_no` varchar(4) NOT NULL, `from_date` date NOT NULL, `to_date` date NOT NULL) ENGINE=InnoDB
|
120
120
|
ALTER TABLE `dept_emp` ADD INDEX dept_no (`dept_no`), ADD INDEX emp_no (`emp_no`)
|
121
|
-
CREATE TABLE `dept_manager` (`dept_no` varchar(4) NOT NULL, `emp_no` int
|
121
|
+
CREATE TABLE `dept_manager` (`dept_no` varchar(4) NOT NULL, `emp_no` int NOT NULL, `from_date` date NOT NULL, `to_date` date NOT NULL) ENGINE=InnoDB
|
122
122
|
ALTER TABLE `dept_manager` ADD INDEX dept_no (`dept_no`), ADD INDEX emp_no (`emp_no`)
|
123
|
-
CREATE TABLE `employee_clubs` (`id` int
|
123
|
+
CREATE TABLE `employee_clubs` (`id` int unsigned auto_increment PRIMARY KEY, `emp_no` int unsigned NOT NULL, `club_id` int unsigned NOT NULL) ENGINE=InnoDB
|
124
124
|
ALTER TABLE `employee_clubs` ADD INDEX idx_emp_no_club_id (`emp_no`, `club_id`)
|
125
|
-
CREATE TABLE `employees` (`emp_no` int
|
126
|
-
CREATE TABLE `salaries` (`emp_no` int
|
125
|
+
CREATE TABLE `employees` (`emp_no` int unsigned auto_increment PRIMARY KEY, `birth_date` date NOT NULL, `first_name` varchar(14) NOT NULL, `last_name` varchar(16) NOT NULL, `gender` varchar(1) NOT NULL, `hire_date` date NOT NULL) ENGINE=InnoDB
|
126
|
+
CREATE TABLE `salaries` (`emp_no` int NOT NULL, `salary` int NOT NULL, `from_date` date NOT NULL, `to_date` date NOT NULL) ENGINE=InnoDB
|
127
127
|
ALTER TABLE `salaries` ADD INDEX emp_no (`emp_no`)
|
128
|
-
CREATE TABLE `titles` (`emp_no` int
|
128
|
+
CREATE TABLE `titles` (`emp_no` int NOT NULL, `title` varchar(50) NOT NULL, `from_date` date NOT NULL, `to_date` date) ENGINE=InnoDB
|
129
129
|
ALTER TABLE `titles` ADD INDEX emp_no (`emp_no`)
|
130
130
|
SQL
|
131
131
|
}
|
@@ -168,8 +168,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
168
168
|
add_index "dept_manager", ["emp_no"], name: "emp_no", using: :btree
|
169
169
|
|
170
170
|
create_table "employee_clubs", force: true do |t|
|
171
|
-
t.integer "emp_no",
|
172
|
-
t.integer "club_id",
|
171
|
+
t.integer "emp_no", null: false, unsigned: true
|
172
|
+
t.integer "club_id", null: false, unsigned: true
|
173
173
|
end
|
174
174
|
|
175
175
|
add_index "employee_clubs", ["emp_no", "club_id"], name: "idx_emp_no_club_id", using: :btree
|
@@ -214,22 +214,22 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
214
214
|
sql = sql.each_line.map {|i| i.strip }.join("\n")
|
215
215
|
|
216
216
|
expect(sql).to eq <<-SQL.strip_heredoc.strip
|
217
|
-
CREATE TABLE `clubs` (`id` int
|
217
|
+
CREATE TABLE `clubs` (`id` int unsigned auto_increment PRIMARY KEY, `name` varchar(255) DEFAULT '' NOT NULL) ENGINE=InnoDB
|
218
218
|
CREATE UNIQUE INDEX `idx_name` USING btree ON `clubs` (`name`)
|
219
|
-
CREATE TABLE `departments` (`dept_no` int
|
219
|
+
CREATE TABLE `departments` (`dept_no` int unsigned auto_increment PRIMARY KEY, `dept_name` varchar(40) NOT NULL) ENGINE=InnoDB
|
220
220
|
CREATE UNIQUE INDEX `dept_name` USING btree ON `departments` (`dept_name`)
|
221
|
-
CREATE TABLE `dept_emp` (`emp_no` int
|
221
|
+
CREATE TABLE `dept_emp` (`emp_no` int NOT NULL, `dept_no` varchar(4) NOT NULL, `from_date` date NOT NULL, `to_date` date NOT NULL) ENGINE=InnoDB
|
222
222
|
CREATE INDEX `dept_no` USING btree ON `dept_emp` (`dept_no`)
|
223
223
|
CREATE INDEX `emp_no` USING btree ON `dept_emp` (`emp_no`)
|
224
|
-
CREATE TABLE `dept_manager` (`dept_no` varchar(4) NOT NULL, `emp_no` int
|
224
|
+
CREATE TABLE `dept_manager` (`dept_no` varchar(4) NOT NULL, `emp_no` int NOT NULL, `from_date` date NOT NULL, `to_date` date NOT NULL) ENGINE=InnoDB
|
225
225
|
CREATE INDEX `dept_no` USING btree ON `dept_manager` (`dept_no`)
|
226
226
|
CREATE INDEX `emp_no` USING btree ON `dept_manager` (`emp_no`)
|
227
|
-
CREATE TABLE `employee_clubs` (`id` int
|
227
|
+
CREATE TABLE `employee_clubs` (`id` int unsigned auto_increment PRIMARY KEY, `emp_no` int unsigned NOT NULL, `club_id` int unsigned NOT NULL) ENGINE=InnoDB
|
228
228
|
CREATE INDEX `idx_emp_no_club_id` USING btree ON `employee_clubs` (`emp_no`, `club_id`)
|
229
|
-
CREATE TABLE `employees` (`emp_no` int
|
230
|
-
CREATE TABLE `salaries` (`emp_no` int
|
229
|
+
CREATE TABLE `employees` (`emp_no` int unsigned auto_increment PRIMARY KEY, `birth_date` date NOT NULL, `first_name` varchar(14) NOT NULL, `last_name` varchar(16) NOT NULL, `gender` varchar(1) NOT NULL, `hire_date` date NOT NULL) ENGINE=InnoDB
|
230
|
+
CREATE TABLE `salaries` (`emp_no` int NOT NULL, `salary` int NOT NULL, `from_date` date NOT NULL, `to_date` date NOT NULL) ENGINE=InnoDB
|
231
231
|
CREATE INDEX `emp_no` USING btree ON `salaries` (`emp_no`)
|
232
|
-
CREATE TABLE `titles` (`emp_no` int
|
232
|
+
CREATE TABLE `titles` (`emp_no` int NOT NULL, `title` varchar(50) NOT NULL, `from_date` date NOT NULL, `to_date` date) ENGINE=InnoDB
|
233
233
|
CREATE INDEX `emp_no` USING btree ON `titles` (`emp_no`)
|
234
234
|
SQL
|
235
235
|
}
|
@@ -35,8 +35,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
35
35
|
add_index "dept_manager", ["emp_no"], name: "emp_no", using: :btree
|
36
36
|
|
37
37
|
create_table "employee_clubs", force: true do |t|
|
38
|
-
t.integer "emp_no",
|
39
|
-
t.integer "club_id",
|
38
|
+
t.integer "emp_no", null: false, unsigned: true
|
39
|
+
t.integer "club_id", null: false, unsigned: true
|
40
40
|
end
|
41
41
|
|
42
42
|
add_index "employee_clubs", ["emp_no", "club_id"], name: "idx_emp_no_club_id", using: :btree
|
@@ -104,8 +104,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
104
104
|
add_index "dept_manager", ["emp_no"], name: "emp_no", using: :btree
|
105
105
|
|
106
106
|
create_table "employee_clubs", force: true do |t|
|
107
|
-
t.integer "emp_no",
|
108
|
-
t.integer "club_id",
|
107
|
+
t.integer "emp_no", null: false, unsigned: true
|
108
|
+
t.integer "club_id", null: false, unsigned: true
|
109
109
|
end
|
110
110
|
|
111
111
|
add_index "employee_clubs", ["emp_no", "club_id"], name: "idx_emp_no_club_id", using: :btree
|
@@ -35,8 +35,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
35
35
|
add_index "dept_manager", ["emp_no"], name: "emp_no", using: :btree
|
36
36
|
|
37
37
|
create_table "employee_clubs", force: true do |t|
|
38
|
-
t.integer "emp_no",
|
39
|
-
t.integer "club_id",
|
38
|
+
t.integer "emp_no", null: false, unsigned: true
|
39
|
+
t.integer "club_id", null: false, unsigned: true
|
40
40
|
end
|
41
41
|
|
42
42
|
add_index "employee_clubs", ["emp_no", "club_id"], name: "idx_emp_no_club_id", using: :btree
|
@@ -104,8 +104,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
104
104
|
add_index "dept_manager", ["emp_no"], name: "emp_no", using: :btree
|
105
105
|
|
106
106
|
create_table "employee_clubs", force: true do |t|
|
107
|
-
t.integer "emp_no",
|
108
|
-
t.integer "club_id",
|
107
|
+
t.integer "emp_no", null: false, unsigned: true
|
108
|
+
t.integer "club_id", null: false, unsigned: true
|
109
109
|
end
|
110
110
|
|
111
111
|
add_index "employee_clubs", ["emp_no", "club_id"], name: "idx_emp_no_club_id", using: :btree
|
@@ -3,8 +3,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
3
3
|
let(:actual_dsl) {
|
4
4
|
<<-RUBY
|
5
5
|
create_table "employee_clubs", force: true do |t|
|
6
|
-
t.integer "emp_no",
|
7
|
-
t.integer "club_id",
|
6
|
+
t.integer "emp_no", null: false, unsigned: true
|
7
|
+
t.integer "club_id", null: false
|
8
8
|
end
|
9
9
|
RUBY
|
10
10
|
}
|
@@ -12,7 +12,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
12
12
|
let(:expected_dsl) {
|
13
13
|
<<-RUBY
|
14
14
|
create_table "employee_clubs", force: true do |t|
|
15
|
-
t.integer "emp_no",
|
15
|
+
t.integer "emp_no", null: false, unsigned: true
|
16
16
|
t.integer "club_id", unsigned: false,null: false
|
17
17
|
end
|
18
18
|
RUBY
|
@@ -26,7 +26,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
26
26
|
expect(delta.differ?).to be_falsey
|
27
27
|
expect(subject.dump).to eq actual_dsl.strip_heredoc.strip
|
28
28
|
delta.migrate
|
29
|
-
expect(subject.dump).to eq expected_dsl.strip_heredoc.strip.gsub('unsigned: false,', '
|
29
|
+
expect(subject.dump).to eq expected_dsl.strip_heredoc.strip.gsub('unsigned: false,', '')
|
30
30
|
}
|
31
31
|
end
|
32
32
|
|
@@ -34,7 +34,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
34
34
|
let(:actual_dsl) {
|
35
35
|
<<-RUBY
|
36
36
|
create_table "employee_clubs", force: true do |t|
|
37
|
-
t.integer "emp_no",
|
37
|
+
t.integer "emp_no", null: false, unsigned: true
|
38
38
|
t.integer "club_id", unsigned: false,null: false
|
39
39
|
end
|
40
40
|
RUBY
|
@@ -43,8 +43,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
43
43
|
let(:expected_dsl) {
|
44
44
|
<<-RUBY
|
45
45
|
create_table "employee_clubs", force: true do |t|
|
46
|
-
t.integer "emp_no",
|
47
|
-
t.integer "club_id",
|
46
|
+
t.integer "emp_no", null: false, unsigned: true
|
47
|
+
t.integer "club_id", null: false
|
48
48
|
end
|
49
49
|
RUBY
|
50
50
|
}
|
@@ -55,7 +55,7 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
55
55
|
it {
|
56
56
|
delta = subject.diff(expected_dsl)
|
57
57
|
expect(delta.differ?).to be_falsey
|
58
|
-
expect(subject.dump).to eq actual_dsl.strip_heredoc.strip.gsub('unsigned: false,', '
|
58
|
+
expect(subject.dump).to eq actual_dsl.strip_heredoc.strip.gsub('unsigned: false,', '')
|
59
59
|
delta.migrate
|
60
60
|
expect(subject.dump).to eq expected_dsl.strip_heredoc.strip
|
61
61
|
}
|
@@ -35,8 +35,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
35
35
|
add_index "dept_manager", ["emp_no"], name: "emp_no", using: :btree
|
36
36
|
|
37
37
|
create_table "employee_clubs", force: true do |t|
|
38
|
-
t.integer "emp_no",
|
39
|
-
t.integer "club_id",
|
38
|
+
t.integer "emp_no", null: false, unsigned: true
|
39
|
+
t.integer "club_id", null: false, unsigned: true
|
40
40
|
end
|
41
41
|
|
42
42
|
add_index "employee_clubs", ["emp_no", "club_id"], name: "idx_emp_no_club_id", using: :btree
|
@@ -36,8 +36,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
36
36
|
add_index "dept_manager", ["emp_no"], name: "emp_no", using: :btree
|
37
37
|
|
38
38
|
create_table "employee_clubs", force: true do |t|
|
39
|
-
t.integer "emp_no",
|
40
|
-
t.integer "club_id",
|
39
|
+
t.integer "emp_no", null: false, unsigned: true
|
40
|
+
t.integer "club_id", null: false, unsigned: true
|
41
41
|
end
|
42
42
|
|
43
43
|
add_index "employee_clubs", ["emp_no", "Xclub_id"], name: "idx_emp_no_club_id", using: :btree
|
@@ -35,8 +35,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
35
35
|
add_index "dept_manager", ["emp_no"], name: "emp_no", using: :btree
|
36
36
|
|
37
37
|
create_table "employee_clubs", force: true do |t|
|
38
|
-
t.integer "emp_no",
|
39
|
-
t.integer "club_id",
|
38
|
+
t.integer "emp_no", null: false, unsigned: true
|
39
|
+
t.integer "club_id", null: false, unsigned: true
|
40
40
|
end
|
41
41
|
|
42
42
|
add_index "employee_clubs", ["emp_no", "club_id"], name: "idx_emp_no_club_id", using: :btree
|
@@ -104,8 +104,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
104
104
|
add_index "dept_manager", ["emp_no"], name: "emp_no", using: :btree
|
105
105
|
|
106
106
|
create_table "employee_clubs", force: true do |t|
|
107
|
-
t.integer "emp_no",
|
108
|
-
t.integer "club_id",
|
107
|
+
t.integer "emp_no", null: false, unsigned: true
|
108
|
+
t.integer "club_id", null: false, unsigned: true
|
109
109
|
end
|
110
110
|
|
111
111
|
add_index "employee_clubs", ["emp_no", "club_id"], name: "idx_emp_no_club_id", using: :btree
|
@@ -35,8 +35,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
35
35
|
add_index "dept_manager", ["emp_no"], name: "emp_no", using: :btree
|
36
36
|
|
37
37
|
create_table "employee_clubs", force: true do |t|
|
38
|
-
t.integer "emp_no",
|
39
|
-
t.integer "club_id",
|
38
|
+
t.integer "emp_no", null: false, unsigned: true
|
39
|
+
t.integer "club_id", null: false, unsigned: true
|
40
40
|
end
|
41
41
|
|
42
42
|
add_index "employee_clubs", ["emp_no", "club_id"], name: "idx_emp_no_club_id", using: :btree
|
@@ -104,8 +104,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
104
104
|
add_index "dept_manager", ["emp_no"], name: "emp_no", using: :btree
|
105
105
|
|
106
106
|
create_table "employee_clubs", force: true do |t|
|
107
|
-
t.integer "emp_no",
|
108
|
-
t.integer "club_id",
|
107
|
+
t.integer "emp_no", null: false, unsigned: true
|
108
|
+
t.integer "club_id", null: false, unsigned: true
|
109
109
|
end
|
110
110
|
|
111
111
|
add_index "employee_clubs", ["emp_no", "club_id"], name: "idx_emp_no_club_id", using: :btree
|
@@ -36,8 +36,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
36
36
|
add_index "dept_manager", ["emp_no"], name: "emp_no", using: :btree
|
37
37
|
|
38
38
|
create_table "employee_clubs", force: true do |t|
|
39
|
-
t.integer "emp_no",
|
40
|
-
t.integer "club_id",
|
39
|
+
t.integer "emp_no", null: false, unsigned: true
|
40
|
+
t.integer "club_id", null: false, unsigned: true
|
41
41
|
end
|
42
42
|
|
43
43
|
add_index "employee_clubs", ["emp_no", "club_id"], name: "idx_emp_no_club_id", using: :btree
|
@@ -105,8 +105,8 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
105
105
|
add_index "dept_manager", ["emp_no"], name: "emp_no", using: :btree
|
106
106
|
|
107
107
|
create_table "employee_clubs", force: true do |t|
|
108
|
-
t.integer "emp_no",
|
109
|
-
t.integer "club_id",
|
108
|
+
t.integer "emp_no", null: false, unsigned: true
|
109
|
+
t.integer "club_id", null: false, unsigned: true
|
110
110
|
end
|
111
111
|
|
112
112
|
add_index "employee_clubs", ["emp_no", "club_id"], name: "idx_emp_no_club_id", using: :btree
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ridgepole
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0.beta
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Genki Sugawara
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - ~>
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 0.
|
103
|
+
version: 0.3.1
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - ~>
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0.
|
110
|
+
version: 0.3.1
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: foreigner
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -233,9 +233,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
233
233
|
version: '0'
|
234
234
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
235
235
|
requirements:
|
236
|
-
- - '
|
236
|
+
- - '>'
|
237
237
|
- !ruby/object:Gem::Version
|
238
|
-
version:
|
238
|
+
version: 1.3.1
|
239
239
|
requirements: []
|
240
240
|
rubyforge_project:
|
241
241
|
rubygems_version: 2.0.14
|