online_migrations 0.31.1 → 0.31.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b5e1f97d972736356a7aa992a5fb39d318ebdd9709952c9015f98d832b5e94c1
4
- data.tar.gz: fd4b0fc1ae446665dd22e27519ffa93272def9ea25d107bfed037b754e9f01e0
3
+ metadata.gz: 4afb5d9ab9916861d263de3c38a2436d2ee131ae9988edf282866145a274356d
4
+ data.tar.gz: 761d30f417479db296429af0668bf62e47581aa4a73fce1d9ba72bd62c66173f
5
5
  SHA512:
6
- metadata.gz: 170f3d973598ac2bb5b8cdf6acfa28217b58fda566e3482d1ced37f4e55b173cc32f6e1ca676863df9af0624170b520dcf1bbc50a022278c7664da55ebe317d3
7
- data.tar.gz: 04f8aaeacea73a571b562752a7f525d607ea9f601e64dd147fb5d3f2bf75653764aa458610876b28609d12d93dd0113d4fcf3069ddbd9fee06159ee01a59cc20
6
+ metadata.gz: 9e6930e8069732e7988b731d826a9e82b023c8f4bbebd5827a31efa10747ada86af64e7e75553df5a8d2e318688002e9c194cdf07e9124ef4231986197d885e7
7
+ data.tar.gz: fe46acbfd31436293ead08b37258c877ca4eddf3bb6c41e462a74c89153d4f632e244c2fa5b98b0887fbfe024a3ab8a9ada8ad101fffb9bebfd10dbbd9f5c9bc
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## master (unreleased)
2
2
 
3
+ ## 0.31.2 (2025-11-13)
4
+
5
+ - Fix running background data migrations inline
6
+
3
7
  ## 0.31.1 (2025-11-11)
4
8
 
5
9
  - Do not attempt running background migrations on database with `database_tasks: false`
@@ -37,7 +37,16 @@ module OnlineMigrations
37
37
  # TODO: use 'cursor' accessor from sidekiq in the future.
38
38
  # https://github.com/sidekiq/sidekiq/pull/6606
39
39
  @migration.persist_progress(@_cursor, ticks, duration)
40
- @migration.reload
40
+
41
+ # When using a scheduler, these are running only from a single shard, but when inline -
42
+ # these are run from each shard (not needed, but simplifies the implementation).
43
+ #
44
+ # Do not reload the migration when running inline, because it can be from a different shard
45
+ # than the "default" shard (which is used to lookup background migrations).
46
+ if !Utils.run_background_migrations_inline?
47
+ # Reload to check if the migration's status changed etc.
48
+ @migration.reload
49
+ end
41
50
  end
42
51
 
43
52
  @throttle_checked_at = current_time
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OnlineMigrations
4
- VERSION = "0.31.1"
4
+ VERSION = "0.31.2"
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: online_migrations
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.31.1
4
+ version: 0.31.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - fatkodima
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-11-11 00:00:00.000000000 Z
10
+ date: 2025-11-12 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: activerecord