strong_migrations 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/lib/strong_migrations/checker.rb +5 -2
- data/lib/strong_migrations/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3410e3379861436cbec2b46796069db388fffea222fa50ff46b054a153fbdaf
|
4
|
+
data.tar.gz: f328bee4412388114e888557d9b691ed3dad10bd0a5bf1ffb93c09f0b48d6696
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e588f76685aa486f38949629b2f0aebe5f1acf92a5b53a29b4e4e1f5f334439eec3ef915240736caf55cff1f21197369305ec073c6adbbedaf6477aabb282cb
|
7
|
+
data.tar.gz: 3e350c8a68ec076295d36aac330ff9eae5ad75329b9775fb8839319f7fbc99c62b8ea58ca5fc57ec36c750a510f9ae743a76fd6fedc7fd755d1e07b7ab7230b5
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -313,7 +313,7 @@ If you intend to drop an existing table, run `drop_table` first.
|
|
313
313
|
|
314
314
|
#### Bad
|
315
315
|
|
316
|
-
Setting `NOT NULL` on an existing column blocks reads and writes while
|
316
|
+
Setting `NOT NULL` on an existing column blocks reads and writes while every row is checked.
|
317
317
|
|
318
318
|
```ruby
|
319
319
|
class SetSomeColumnNotNull < ActiveRecord::Migration[6.0]
|
@@ -298,7 +298,8 @@ Then add the foreign key in separate migrations."
|
|
298
298
|
if postgresql?
|
299
299
|
"SET statement_timeout TO #{connection.quote(postgresql_timeout(StrongMigrations.statement_timeout))}"
|
300
300
|
elsif mysql?
|
301
|
-
|
301
|
+
# use ceil to prevent no timeout for values under 1 ms
|
302
|
+
"SET max_execution_time = #{connection.quote((StrongMigrations.statement_timeout.to_f * 1000).ceil)}"
|
302
303
|
elsif mariadb?
|
303
304
|
"SET max_statement_time = #{connection.quote(StrongMigrations.statement_timeout)}"
|
304
305
|
else
|
@@ -404,6 +405,7 @@ Then add the foreign key in separate migrations."
|
|
404
405
|
end
|
405
406
|
elsif mysql? || mariadb?
|
406
407
|
lock_timeout = connection.select_all("SHOW VARIABLES LIKE 'lock_wait_timeout'").first["Value"]
|
408
|
+
# lock timeout is an integer
|
407
409
|
if lock_timeout.to_i > limit
|
408
410
|
warn "[strong_migrations] DANGER: Lock timeout is longer than #{limit} seconds: #{lock_timeout}"
|
409
411
|
end
|
@@ -436,7 +438,8 @@ Then add the foreign key in separate migrations."
|
|
436
438
|
if timeout.is_a?(String)
|
437
439
|
timeout
|
438
440
|
else
|
439
|
-
timeout
|
441
|
+
# use ceil to prevent no timeout for values under 1 ms
|
442
|
+
(timeout.to_f * 1000).ceil
|
440
443
|
end
|
441
444
|
end
|
442
445
|
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
- Bob Remeika
|
9
9
|
- David Waller
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2020-
|
13
|
+
date: 2020-10-25 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activerecord
|
@@ -96,7 +96,7 @@ dependencies:
|
|
96
96
|
- - ">="
|
97
97
|
- !ruby/object:Gem::Version
|
98
98
|
version: '0'
|
99
|
-
description:
|
99
|
+
description:
|
100
100
|
email:
|
101
101
|
- andrew@chartkick.com
|
102
102
|
- bob.remeika@gmail.com
|
@@ -122,7 +122,7 @@ homepage: https://github.com/ankane/strong_migrations
|
|
122
122
|
licenses:
|
123
123
|
- MIT
|
124
124
|
metadata: {}
|
125
|
-
post_install_message:
|
125
|
+
post_install_message:
|
126
126
|
rdoc_options: []
|
127
127
|
require_paths:
|
128
128
|
- lib
|
@@ -137,8 +137,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
139
|
requirements: []
|
140
|
-
rubygems_version: 3.1.
|
141
|
-
signing_key:
|
140
|
+
rubygems_version: 3.1.4
|
141
|
+
signing_key:
|
142
142
|
specification_version: 4
|
143
143
|
summary: Catch unsafe migrations in development
|
144
144
|
test_files: []
|