generated_schema_validations 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -1
- data/generated_schema_validations.gemspec +1 -1
- data/lib/generated_schema_validations/template.rb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e54dc27fed92ad93653f938b7fdb48a6d06754d5fbd845d1d065d3bddfc970dc
|
4
|
+
data.tar.gz: df96b1f41973aa786587402d092e508a74630ebcfe7fd646209a5908e94f0c01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa9e551d29490824e11f5fd89061dc95a2e23dc6ae462ef6e17a03d21f78887243132dac9301a48ff7a9b5c6cd4a1c3a2a4dde5c5475f2c2e1dd6f0c2a75a773
|
7
|
+
data.tar.gz: a49ca993efc1610e734ad2e680e0158891126bb384c1121ec444d382ba42ed126b72c645596e2ce8e557d004976564bd548cebfd5c66f668f5ce2a5067e56b71
|
data/README.md
CHANGED
@@ -51,7 +51,7 @@ class User < ApplicationRecord
|
|
51
51
|
end
|
52
52
|
```
|
53
53
|
|
54
|
-
### Exclude from
|
54
|
+
### Exclude from rubocop and simplecov
|
55
55
|
|
56
56
|
Add to simplecov config file (e.g. `.simplecov`):
|
57
57
|
|
@@ -95,6 +95,10 @@ You can watch changes on `schema_validations.rb` to understand the generated val
|
|
95
95
|
|
96
96
|
## Changelog
|
97
97
|
|
98
|
+
### 0.1.2
|
99
|
+
|
100
|
+
* Exclude columns in unique validations
|
101
|
+
|
98
102
|
### 0.1.1
|
99
103
|
|
100
104
|
* Add column type `binary`
|
@@ -54,6 +54,7 @@ module SchemaValidations
|
|
54
54
|
def dbv_uniqueness_validations_for(unique_indexes, foreign_key:, column:)
|
55
55
|
unique_indexes.each do |names|
|
56
56
|
next unless foreign_key.in?(names)
|
57
|
+
next if column.to_sym.in?(schema_validations_excluded_columns)
|
57
58
|
|
58
59
|
scope = (names - [foreign_key]).map(&:to_sym)
|
59
60
|
options = { allow_nil: true }
|