database_consistency 2.1.0 → 2.1.1
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '0932d2df82273397f2389dada3d7934fa796f9bb9e3b4c07382b629682c7b19d'
|
|
4
|
+
data.tar.gz: 1d752233498fad2addba69e7b37f5f3a6364493c2bec3883a821901eee2f7061
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c0cbca026d510fa349ce5a69c39bbc0b0164ee27bc93e3f75870cdb8b026ca59b5fdbd3466b1eec15b89c921d4f917b7a2f12900d6326e30da33a426aadbcfd3
|
|
7
|
+
data.tar.gz: b2cd0dc46bc459f3dd2b96e7041b7b7de1ab13e5b2eab347283d8d3d89fc64e82cd94051cae052fe0e52c55b517afc510b4cd1e7fda261b420daf518adc5be49
|
data/lib/database_consistency/checkers/association_checkers/missing_dependent_destroy_checker.rb
CHANGED
|
@@ -10,7 +10,7 @@ module DatabaseConsistency
|
|
|
10
10
|
:attribute_name
|
|
11
11
|
)
|
|
12
12
|
|
|
13
|
-
DEPENDENT_OPTIONS = %i[destroy delete delete_all nullify].freeze
|
|
13
|
+
DEPENDENT_OPTIONS = %i[destroy delete delete_all nullify restrict_with_error restrict_with_exception].freeze
|
|
14
14
|
|
|
15
15
|
private
|
|
16
16
|
|
|
@@ -27,7 +27,7 @@ module DatabaseConsistency
|
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
def dependent_destroy_exists?
|
|
30
|
-
association.
|
|
30
|
+
association.klass.reflect_on_all_associations.any? do |association|
|
|
31
31
|
%i[has_many has_one].include?(association.macro) &&
|
|
32
32
|
DEPENDENT_OPTIONS.include?(association.options[:dependent]) &&
|
|
33
33
|
association.table_name == model.table_name
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: database_consistency
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.1.
|
|
4
|
+
version: 2.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Evgeniy Demin
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-12-
|
|
11
|
+
date: 2025-12-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|