database_consistency 1.7.26 → 1.7.27
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ba4d8b566474e443336b5b7c471ad85bb492581847cb721daa5ba41be272bc0
|
4
|
+
data.tar.gz: c5c80cbfd15eae2e8b948cc44233d1c2c74a67a734ee0867a30defd3ed8a877d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d49d5e2e5f15577114ae6adaa8453db9ad9573bd0af6f0bc2eafb8319b30a04fae8f7ef6005e7c5990da1686d79a1d5e58ac535a182152767bf68764daf4edb
|
7
|
+
data.tar.gz: f9a07275157c90e2e20b04706a5f6b95974918d7c0716ea16f91cd2737a4b60bc0a82b65f9f2e8a286c1f9d3976d1d0f4f78b0dabc832079c37644010a8563d6
|
@@ -6,8 +6,6 @@ module DatabaseConsistency
|
|
6
6
|
module Helpers
|
7
7
|
module Migration # :nodoc:
|
8
8
|
def migration_path(name)
|
9
|
-
migration_context = ActiveRecord::Base.connection.migration_context
|
10
|
-
|
11
9
|
last = migration_context.migrations.last
|
12
10
|
version = ActiveRecord::Migration.next_migration_number(last&.version.to_i + 1)
|
13
11
|
|
@@ -24,6 +22,21 @@ module DatabaseConsistency
|
|
24
22
|
migration_version: ActiveRecord::Migration.current_version
|
25
23
|
}
|
26
24
|
end
|
25
|
+
|
26
|
+
def migration_context
|
27
|
+
if ActiveRecord::MigrationContext.instance_method(:initialize).arity == 1
|
28
|
+
return ActiveRecord::MigrationContext.new(ActiveRecord::Migrator.migrations_paths)
|
29
|
+
end
|
30
|
+
|
31
|
+
if ActiveRecord::Base.connection.respond_to?(:schema_migration)
|
32
|
+
return ActiveRecord::MigrationContext.new(
|
33
|
+
ActiveRecord::Migrator.migrations_paths,
|
34
|
+
ActiveRecord::Base.connection.schema_migration
|
35
|
+
)
|
36
|
+
end
|
37
|
+
|
38
|
+
ActiveRecord::MigrationContext.new(ActiveRecord::Migrator.migrations_paths)
|
39
|
+
end
|
27
40
|
end
|
28
41
|
end
|
29
42
|
end
|
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: 1.7.
|
4
|
+
version: 1.7.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Evgeniy Demin
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -136,7 +136,7 @@ dependencies:
|
|
136
136
|
- - ">"
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '1.3'
|
139
|
-
description:
|
139
|
+
description:
|
140
140
|
email:
|
141
141
|
- lawliet.djez@gmail.com
|
142
142
|
executables:
|
@@ -273,9 +273,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
273
273
|
- !ruby/object:Gem::Version
|
274
274
|
version: '0'
|
275
275
|
requirements: []
|
276
|
-
rubygems_version: 3.
|
277
|
-
signing_key:
|
276
|
+
rubygems_version: 3.2.33
|
277
|
+
signing_key:
|
278
278
|
specification_version: 4
|
279
279
|
summary: Provide an easy way to check the consistency of the database constraints
|
280
280
|
with the application validations.
|
281
281
|
test_files: []
|
282
|
+
...
|