online_migrations 0.19.5 → 0.19.6
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: cd8711d56259535675633074868019a5c4b3de068bb30d783c9ae16dc906afb1
|
4
|
+
data.tar.gz: 3b417e176d143092d69e4551c1f96a32e1a2acf1d74d268fc33f9b5a598be553
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad26fd5662f2636479b697933042b8d7e60b4ee42f136ddeb8cff8256c65a4491b8017d09d2da849faf65cb6f8d4ecc95595816b7669c8364e9f31bbe75232c4
|
7
|
+
data.tar.gz: 21fec027462ff6f96baaf0fc65d186fc68fefbb50fd3de6af8f561aae691e6f9909d70d7053557d39f0a56ea498841816c2853cce0b1acef161411b2d968b196
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
## master (unreleased)
|
2
2
|
|
3
|
+
## 0.19.6 (2024-09-26)
|
4
|
+
|
5
|
+
- Fix `add_refernce_concurrently` when adding non polymorphic references
|
6
|
+
- Fix progress for background migrations with small number of records
|
7
|
+
|
3
8
|
## 0.19.5 (2024-09-20)
|
4
9
|
|
5
10
|
- Fix `add_reference_concurrently` when adding polymorphic references
|
@@ -138,7 +138,7 @@ module OnlineMigrations
|
|
138
138
|
progresses.sum.round(2)
|
139
139
|
end
|
140
140
|
elsif rows_count
|
141
|
-
if rows_count > 0
|
141
|
+
if rows_count > 0 && rows_count > batch_size
|
142
142
|
jobs_rows_count = migration_jobs.succeeded.sum(:batch_size)
|
143
143
|
# The last migration job may need to process the amount of rows
|
144
144
|
# less than the batch size, so we can get a value > 1.0.
|
@@ -183,14 +183,14 @@ module OnlineMigrations
|
|
183
183
|
def retry
|
184
184
|
if composite? && failed?
|
185
185
|
children.failed.each(&:retry)
|
186
|
-
|
186
|
+
enqueued!
|
187
187
|
true
|
188
188
|
elsif failed?
|
189
189
|
iterator = BatchIterator.new(migration_jobs.failed)
|
190
190
|
iterator.each_batch(of: 100) do |batch|
|
191
191
|
batch.each(&:retry)
|
192
192
|
end
|
193
|
-
|
193
|
+
enqueued!
|
194
194
|
true
|
195
195
|
else
|
196
196
|
false
|
@@ -655,7 +655,7 @@ module OnlineMigrations
|
|
655
655
|
add_column(table_name, column_name, type, null: allow_null)
|
656
656
|
end
|
657
657
|
|
658
|
-
if !column_exists?(table_name, type_column_name)
|
658
|
+
if options[:polymorphic] && !column_exists?(table_name, type_column_name)
|
659
659
|
allow_null = options[:polymorphic].is_a?(Hash) ? options[:polymorphic][:null] : true
|
660
660
|
add_column(table_name, type_column_name, :string, null: allow_null)
|
661
661
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: online_migrations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.19.
|
4
|
+
version: 0.19.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- fatkodima
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-09-
|
11
|
+
date: 2024-09-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|