online_migrations 0.30.0 → 0.31.0
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '0872638ad98f95ef8fa347b719f14d548fec58402dd8fc6a06702c9d884f9346'
|
|
4
|
+
data.tar.gz: 572c037d2bf35cf048b8e1ee45fb0e464d375a3adec18264ba3e8f78b5cd433b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8da4b37bc6b6e88803a478844b32aa6d04d28b95ab6a147caea69a22e1ce512a70e0df9e6196ceb0cbc87a5c1a164f01d927adcb054d36d2aa98e56ecac854c9
|
|
7
|
+
data.tar.gz: f0a3f79d9ba42b596f27861ed9b046d82fd3805b47d62c7745b4bac7e69033904a6bbd90ea9d137370679e6e4ea8a42672cd31378f28b8a6b5d52141837c4d86
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
## master (unreleased)
|
|
2
2
|
|
|
3
|
+
## 0.31.0 (2025-10-22)
|
|
4
|
+
|
|
5
|
+
- Store backtraces for failed background data migrations jobs
|
|
6
|
+
- Make `add_column` idempotent
|
|
7
|
+
- Fix `NullLockRetrier#with_lock_retries` method signature
|
|
8
|
+
|
|
3
9
|
## 0.30.0 (2025-10-17)
|
|
4
10
|
|
|
5
11
|
- Fix `remove_check_constraint` when using `:if_exists`
|
|
@@ -630,6 +630,19 @@ module OnlineMigrations
|
|
|
630
630
|
remove_check_constraint(table_name, name: name)
|
|
631
631
|
end
|
|
632
632
|
|
|
633
|
+
# Extends default method to be idempotent and automatically recreate invalid indexes.
|
|
634
|
+
#
|
|
635
|
+
# @see https://api.rubyonrails.org/v8.1/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html#method-i-add_column
|
|
636
|
+
#
|
|
637
|
+
def add_column(table_name, column_name, type, **options)
|
|
638
|
+
if column_exists?(table_name, column_name, type, **options)
|
|
639
|
+
Utils.say("Column was not added because it already exists (this may be due to an aborted migration " \
|
|
640
|
+
"or similar) table_name: #{table_name}, column_name: #{column_name}")
|
|
641
|
+
else
|
|
642
|
+
super
|
|
643
|
+
end
|
|
644
|
+
end
|
|
645
|
+
|
|
633
646
|
# Adds a reference to the table with minimal locking
|
|
634
647
|
#
|
|
635
648
|
# Active Record adds an index non-`CONCURRENTLY` to references by default, which blocks writes.
|
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.
|
|
4
|
+
version: 0.31.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- fatkodima
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2025-10-
|
|
10
|
+
date: 2025-10-22 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: activerecord
|