ridgepole 0.6.0.beta → 0.6.0.beta2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/bin/ridgepole +10 -1
- data/lib/ridgepole/diff.rb +1 -0
- data/lib/ridgepole/version.rb +1 -1
- data/lib/ridgepole.rb +1 -0
- data/spec/cli/ridgepole_spec.rb +1 -0
- data/spec/migrate/migrate_change_index_spec.rb +6 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6ae74a3fb40232b6c6a0fba3cc64ca556684bba
|
4
|
+
data.tar.gz: ba614d9bc208b5d6ddbef3f125d30cd89d5e719c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 787b4a10c9993dc834880c5593a89ee501709cf83c94f4686a0e12f2a3173363aaf6fc339c06a150287e4005bc481e263174dfc8673350a9bc20afcd4f942e95
|
7
|
+
data.tar.gz: 92843a96b3c721a54f5328215bda9d8f2778f7cb5744de6790e5db18b87182d043fcbdf3c781aec20a458da5411d704c91830dcb1020eecc0ac345b34fc1bc03
|
data/README.md
CHANGED
data/bin/ridgepole
CHANGED
@@ -68,7 +68,16 @@ ARGV.options do |opt|
|
|
68
68
|
}
|
69
69
|
|
70
70
|
Ridgepole::DEFAULTS_LIMITS.keys.each do |column_type|
|
71
|
-
|
71
|
+
case column_type
|
72
|
+
when :integer
|
73
|
+
option_column_type = :int
|
74
|
+
when :boolean
|
75
|
+
option_column_type = :bool
|
76
|
+
else
|
77
|
+
option_column_type = column_type
|
78
|
+
end
|
79
|
+
|
80
|
+
opt.on('', "--default-#{option_column_type}-limit LIMIT", Integer) {|v|
|
72
81
|
options[:"default_#{column_type}_limit"] = v
|
73
82
|
}
|
74
83
|
end
|
data/lib/ridgepole/diff.rb
CHANGED
@@ -262,6 +262,7 @@ class Ridgepole::Diff
|
|
262
262
|
def normalize_index_options!(opts)
|
263
263
|
# XXX: MySQL only?
|
264
264
|
opts[:using] = :btree unless opts.has_key?(:using)
|
265
|
+
opts[:unique] = false unless opts.has_key?(:unique)
|
265
266
|
end
|
266
267
|
|
267
268
|
def columns_all_include?(expected_columns, actual_columns, table_options)
|
data/lib/ridgepole/version.rb
CHANGED
data/lib/ridgepole.rb
CHANGED
data/spec/cli/ridgepole_spec.rb
CHANGED
@@ -223,13 +223,13 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
223
223
|
expect(delta.differ?).to be_truthy
|
224
224
|
expect(delta.script).to eq <<-RUBY.strip_heredoc.strip
|
225
225
|
remove_index("dept_emp", {:name=>"emp_no"})
|
226
|
-
add_index("dept_emp", ["emp_no"], {:name=>"emp_no", :using=>:btree})
|
226
|
+
add_index("dept_emp", ["emp_no"], {:name=>"emp_no", :using=>:btree, :unique=>false})
|
227
227
|
|
228
228
|
remove_index("dept_manager", {:name=>"emp_no"})
|
229
|
-
add_index("dept_manager", ["emp_no"], {:name=>"emp_no", :using=>:btree})
|
229
|
+
add_index("dept_manager", ["emp_no"], {:name=>"emp_no", :using=>:btree, :unique=>false})
|
230
230
|
|
231
231
|
remove_index("salaries", {:name=>"emp_no"})
|
232
|
-
add_index("salaries", ["emp_no"], {:name=>"emp_no", :using=>:btree})
|
232
|
+
add_index("salaries", ["emp_no"], {:name=>"emp_no", :using=>:btree, :unique=>false})
|
233
233
|
RUBY
|
234
234
|
}
|
235
235
|
|
@@ -240,17 +240,17 @@ describe 'Ridgepole::Client#diff -> migrate' do
|
|
240
240
|
expect(delta.script).to eq <<-RUBY.strip_heredoc.strip
|
241
241
|
change_table("dept_emp", {:bulk => true}) do |t|
|
242
242
|
t.remove_index({:name=>"emp_no"})
|
243
|
-
t.index(["from_date"], {:name=>"emp_no", :using=>:btree})
|
243
|
+
t.index(["from_date"], {:name=>"emp_no", :using=>:btree, :unique=>false})
|
244
244
|
end
|
245
245
|
|
246
246
|
change_table("dept_manager", {:bulk => true}) do |t|
|
247
247
|
t.remove_index({:name=>"emp_no"})
|
248
|
-
t.index(["from_date"], {:name=>"emp_no", :using=>:btree})
|
248
|
+
t.index(["from_date"], {:name=>"emp_no", :using=>:btree, :unique=>false})
|
249
249
|
end
|
250
250
|
|
251
251
|
change_table("salaries", {:bulk => true}) do |t|
|
252
252
|
t.remove_index({:name=>"emp_no"})
|
253
|
-
t.index(["from_date"], {:name=>"emp_no", :using=>:btree})
|
253
|
+
t.index(["from_date"], {:name=>"emp_no", :using=>:btree, :unique=>false})
|
254
254
|
end
|
255
255
|
RUBY
|
256
256
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ridgepole
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.0.
|
4
|
+
version: 0.6.0.beta2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Genki Sugawara
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|