database_consistency 0.7.4 → 0.7.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/database_consistency +2 -0
- data/lib/database_consistency/helper.rb +3 -1
- data/lib/database_consistency/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a0bd9098639aa98ed190bc90d9334d7dbbeaf9fa368cf73d4e9c08d4778f0be
|
4
|
+
data.tar.gz: 1294d60591ae3bf21313cc88254e57e03225501601b6b5bbb33634e7cb0bfc19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef673d307c963330307ca143b6176ba3211f6bc8799ed67b0a1b7d07e0eb1a2cf0a1460aa26a6626c1ac95103e4871aa29ec24f770ef33164ba41bfaf6d8a4df
|
7
|
+
data.tar.gz: c6b5469b5293f8445a6327ab4f65027e00cc5bc417058e688715fd1b7a3c16e5209670c69557388e09e0fb27a79ea109b8e7c5737af2f9ad055d8d2deed9d840
|
data/bin/database_consistency
CHANGED
@@ -7,7 +7,9 @@ module DatabaseConsistency
|
|
7
7
|
|
8
8
|
# Returns list of models to check
|
9
9
|
def models
|
10
|
-
ActiveRecord::Base.descendants.delete_if(&:abstract_class?)
|
10
|
+
ActiveRecord::Base.descendants.delete_if(&:abstract_class?).delete_if do |klass|
|
11
|
+
!klass.connection.table_exists?(klass.table_name)
|
12
|
+
end
|
11
13
|
end
|
12
14
|
|
13
15
|
# Return list of not inherited models
|
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: 0.7.
|
4
|
+
version: 0.7.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Evgeniy Demin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|