safe-pg-migrations 3.1.3 → 3.1.4

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: 18c16ec10af9c7dbdfad913c8259d242896fbed43a91572daf9925994c3ff6df
4
- data.tar.gz: a7285bbbf70ebcd7421193c9dc1bd7c7e38690a3513b29054fb2ca305170fbea
3
+ metadata.gz: 06ca39e801ba6836f1059e9a3f66c9d54d1f1920a39f421904ae592944ae4281
4
+ data.tar.gz: b15dec6a1f06f7a6801ec32a497672059d7132792495a47745fb4f2916bf9a78
5
5
  SHA512:
6
- metadata.gz: 9e7d6855793f6a4d563165e1c055b20fbdaf28e3bb808d036bde20657085b0433230bb76c22ea08cb2995dbe2d0200fa7c0a9fd71be84923eab89b1e26dd375f
7
- data.tar.gz: 1b351fd95eef8602396f9275cdc099f09db2904c52ff7d61f714f29046c01f5e89b4d6d0b339c7e70f97d223bd33dba5ec6153d97c401ef879d6ea3bf01edb14
6
+ metadata.gz: 330c11df6898b0a4a13114e75f1bcdec8ae9935c8ebbba427bf634a6d4ba896c6e56994edeaa761ede31c024b60bdca82282181057585469d358a2ae7dc6aec2
7
+ data.tar.gz: 47623a5dd9404a438af11dd7334b7989da829b775128f4076d3ea7e6a236e2ce2a068d38603aae9e4501b89e8988a4e6d14da54501afaa1c2f927aca6f087992
@@ -41,7 +41,7 @@ module SafePgMigrations
41
41
  queries.each do |start_time, locktype, mode, pid, transactionid|
42
42
  Logger.say <<~MESSAGE.squish, sub_item: true, sensitive: true
43
43
  Query with pid #{pid || 'null'}
44
- started #{start_time ? format_start_time(start_time) : 'unknown'}:
44
+ started #{format_start_time(start_time)}:
45
45
  lock type: #{locktype || 'null'},
46
46
  lock mode: #{mode || 'null'},
47
47
  lock transactionid: #{transactionid || 'null'}",
@@ -50,6 +50,8 @@ module SafePgMigrations
50
50
  end
51
51
 
52
52
  def format_start_time(start_time, reference_time = Time.now)
53
+ return '(unknown start time)' unless start_time
54
+
53
55
  start_time = Time.parse(start_time) unless start_time.is_a? Time
54
56
 
55
57
  duration = (reference_time - start_time).round
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SafePgMigrations
4
- VERSION = '3.1.3'
4
+ VERSION = '3.1.4'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: safe-pg-migrations
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.3
4
+ version: 3.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthieu Prat
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2025-03-19 00:00:00.000000000 Z
14
+ date: 2025-03-26 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activerecord