nexus_seed 0.2.22 → 0.2.24

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: 73e46e94919f9d390f747f4390ffaccb47fb612627ea3a284db978746e5639b6
4
- data.tar.gz: 0c93de072aea4dc408fe747c8606d11ec887aa39a239526d6696d6fbdc70093f
3
+ metadata.gz: 3ff72dd41aa6c341c7cebc19a667959db38293f3e2ace20bcb06c848bf7c7f16
4
+ data.tar.gz: 06f3a7c8538d4ae779c70781be7f04a45e6da3273014dd46fd377cbe3ee7c85d
5
5
  SHA512:
6
- metadata.gz: e615bf54f07064188f85b321d9a998692019bd793ab9181023a83a465f8719297f7185a8f5063254e8e0e077db4afc8e3cec5ac4b7c8f6f47ce5a007fc554244
7
- data.tar.gz: a088230aa3f24b39460dd5d1168bcc0754a497e9638587ae9f0523456482e558ff1a014a9499badfb60176bf79d812fc20cd46b7f197190de4db90e2170d81c3
6
+ metadata.gz: 5f2a5f346350499d658724e5c22b9814358e9934e38b288798cf3331286d926c2d4e363ba39e5fb43b1d0a25553ab13a57ced7e4645117d25573c3d33e65a88b
7
+ data.tar.gz: 841f6fd9e586d440b3f67c582a86ceca90abb4983223589dc5ab16fe936408172a1b1d59a615977b9aa52d3f6419fbd48e5c95ec4fc167e35486091248adeef9
@@ -27,12 +27,13 @@ module NexusSeed
27
27
  # dangerous to call this for all tables when concurrent updates are happening, you must specify the table.
28
28
  def self.activerecord_sync_pk_sequence(table_name)
29
29
  table_seq = ActiveRecord::Base.connection.pk_and_sequence_for(table_name)
30
- next unless table_seq
31
- seq_id = table_seq[1].identifier
32
- seq_value = ActiveRecord::Base.connection.execute("SELECT last_value from #{seq_id}")[0]['last_value']
33
- reset_seq_value = ActiveRecord::Base.connection.reset_pk_sequence!(table_name)
34
- if reset_seq_value != seq_value
35
- logger.info('Reset sequence value.', value: reset_seq_value, sequence: seq_id, table: table_name)
30
+ if table_seq
31
+ seq_id = table_seq[1].identifier
32
+ seq_value = ActiveRecord::Base.connection.execute("SELECT last_value from #{seq_id}")[0]['last_value']
33
+ reset_seq_value = ActiveRecord::Base.connection.reset_pk_sequence!(table_name)
34
+ if reset_seq_value != seq_value
35
+ logger.info('Reset sequence value.', value: reset_seq_value, sequence: seq_id, table: table_name)
36
+ end
36
37
  end
37
38
  end
38
39
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  module NexusSeed
3
- # Leave this as 0.2.22 in order for CI process to replace with the tagged version.
4
- VERSION = '0.2.22'
3
+ # Leave this as 0.2.24 in order for CI process to replace with the tagged version.
4
+ VERSION = '0.2.24'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nexus_seed
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.22
4
+ version: 0.2.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - Johnathon Harris
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-17 00:00:00.000000000 Z
11
+ date: 2023-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nexus_semantic_logger