schema_plus_pg_indexes 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 809e25804e94035df8d24a57d5a255c8d64c8eb8
|
|
4
|
+
data.tar.gz: 92e7716fb86ece5c7f420b22ce6a75cfd36f3677
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ef0acdf61aeda8a0c6980dba96ccbdb4357f7719476238742700cae71d83d757230b44bf19c353cc468a4ea1e479b1d4b1814e4b75911fcd3876b126af6b331f
|
|
7
|
+
data.tar.gz: 2bd3c3b3fb713678d041633c833c7c791e3a9d6909c2b714ce9197105471c38da4dbfcd00c38c90a9c014848a6f21dda7c61d92a05906bf12e16554fa9e9874b
|
data/README.md
CHANGED
|
@@ -61,7 +61,8 @@ schema_plus_pg_indexes is tested on
|
|
|
61
61
|
|
|
62
62
|
## History
|
|
63
63
|
|
|
64
|
-
* v0.1.
|
|
64
|
+
* v0.1.6 - Bug fix: operator class & multiple columns (#4). Thanks to [@nbudin](https://github.com/nbudin)
|
|
65
|
+
* v0.1.5 - Bug fix: `t.index` without column in `change_table`
|
|
65
66
|
* v0.1.1 through v0.1.4 - Conform to schema_dev updates
|
|
66
67
|
* v0.1.0 - Initial release
|
|
67
68
|
|
|
@@ -16,7 +16,7 @@ module SchemaPlusPgIndexes
|
|
|
16
16
|
else
|
|
17
17
|
index_dump.add_option "case_sensitive: false" unless index_def.case_sensitive?
|
|
18
18
|
unless index_def.operator_classes.blank?
|
|
19
|
-
if index_def.operator_classes.values.uniq.length == 1
|
|
19
|
+
if index_def.columns.uniq.length == 1 && index_def.operator_classes.values.uniq.length == 1
|
|
20
20
|
index_dump.add_option "operator_class: #{index_def.operator_classes.values.first.inspect}"
|
|
21
21
|
else
|
|
22
22
|
index_dump.add_option "operator_class: {" + index_def.operator_classes.map{|column, val| "#{column.inspect}=>#{val.inspect}"}.join(", ") + "}"
|
data/spec/schema_dumper_spec.rb
CHANGED
|
@@ -97,6 +97,12 @@ describe "Schema dump" do
|
|
|
97
97
|
expect(dump_posts).to match(/body.*index:.*operator_class: {"body"=>"text_pattern_ops", "string_no_default"=>"varchar_pattern_ops"}/)
|
|
98
98
|
end
|
|
99
99
|
end
|
|
100
|
+
|
|
101
|
+
it "should define multi-column operator classes even if one column has no operator" do
|
|
102
|
+
with_index Post, [:body, :string_no_default], :operator_class => {string_no_default: 'varchar_pattern_ops'} do
|
|
103
|
+
expect(dump_posts).to match(/body.*index:.*operator_class: {"string_no_default"=>"varchar_pattern_ops"}/)
|
|
104
|
+
end
|
|
105
|
+
end
|
|
100
106
|
|
|
101
107
|
it 'should dump proper operator_class with case_sensitive => false' do
|
|
102
108
|
with_index Post, :body, :operator_class => 'text_pattern_ops', :case_sensitive => false do
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: schema_plus_pg_indexes
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ronen barzel
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-
|
|
11
|
+
date: 2015-09-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|