strong_migrations 0.7.5 → 0.7.6
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 +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +0 -2
- data/lib/generators/strong_migrations/install_generator.rb +5 -1
- data/lib/strong_migrations/checker.rb +1 -2
- data/lib/strong_migrations/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: f16481df30c6b961477b4a537034097aa1d41a262bd7f2741c40b7e6dae9cb9e
|
|
4
|
+
data.tar.gz: 816bc9a4f9810bce6ac6d5e0a52b185800515794ca5e3d27b5f4d512a9190115
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2ac9f7c38958c1cc2e80efa3f895730087ac92a3675be31c308f9f8df827ced3323ca8bc3e69c99e2a79b92ef0a5a8b595a76715bf55c45b5698fcdd43b5a586
|
|
7
|
+
data.tar.gz: 2cee8d3013ae8780f0bcbce33f22a219375c29f059335902cdfe2285ec557307229b7ec4544e6be59ea1ee7cd039f2b23e9b3693efc41f11f677cbbed1495896
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -31,7 +31,11 @@ module StrongMigrations
|
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
def adapter
|
|
34
|
-
ActiveRecord::
|
|
34
|
+
if ActiveRecord::VERSION::STRING.to_f >= 6.1
|
|
35
|
+
ActiveRecord::Base.connection_db_config.adapter.to_s
|
|
36
|
+
else
|
|
37
|
+
ActiveRecord::Base.connection_config[:adapter].to_s
|
|
38
|
+
end
|
|
35
39
|
end
|
|
36
40
|
|
|
37
41
|
def postgresql?
|
|
@@ -219,8 +219,7 @@ Then add the foreign key in separate migrations."
|
|
|
219
219
|
if postgresql?
|
|
220
220
|
safe = false
|
|
221
221
|
if postgresql_version >= Gem::Version.new("12")
|
|
222
|
-
#
|
|
223
|
-
safe = constraints(table).any? { |c| c["def"] == "CHECK ((#{column} IS NOT NULL))" }
|
|
222
|
+
safe = constraints(table).any? { |c| c["def"] == "CHECK ((#{column} IS NOT NULL))" || c["def"] == "CHECK ((#{connection.quote_column_name(column)} IS NOT NULL))" }
|
|
224
223
|
end
|
|
225
224
|
|
|
226
225
|
unless safe
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: strong_migrations
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.7.
|
|
4
|
+
version: 0.7.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andrew Kane
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2021-01-
|
|
13
|
+
date: 2021-01-17 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: activerecord
|