generated_schema_validations 0.1.1 → 0.1.2

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
  SHA256:
3
- metadata.gz: 63b62132a2f9e95998c87df9648aa1e103d10cfd3e8ab0016d474a64c65cd3fc
4
- data.tar.gz: a4f14187f860964319450915caaa30e47078f2c7b7fdab1c8c86cfc0ee15a602
3
+ metadata.gz: e54dc27fed92ad93653f938b7fdb48a6d06754d5fbd845d1d065d3bddfc970dc
4
+ data.tar.gz: df96b1f41973aa786587402d092e508a74630ebcfe7fd646209a5908e94f0c01
5
5
  SHA512:
6
- metadata.gz: fb10c1c5b07e25ada05295bedc944c361cc62b03191eefb98c70f935bd60524622e1d676de3855d4752d3a60738d68161880755b8845dec9a3b46f9b9c667239
7
- data.tar.gz: d5695ce02f54f95bc150ddee5c5917232dd7b8f8fc217aed194e5d66669190eaf3e620a38611a9624634b37e9c3f149b0298a6c39aad97b79946bf37e6118e4f
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 rubocp and simplecov
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`
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'generated_schema_validations'
5
- spec.version = '0.1.1'
5
+ spec.version = '0.1.2'
6
6
  spec.authors = ['Georg Limbach']
7
7
  spec.email = ['georg.limbach@lichtbit.com']
8
8
 
@@ -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 }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: generated_schema_validations
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Georg Limbach