jetstream_bridge 7.0.2 → 7.0.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: b438f568ca21ece1da4e01f0fcea10ab2a2ec893e56a988a54808108f3e46830
4
- data.tar.gz: d7733a1316e720b74d7ac3e887e48aeb49923a7aa555612249ee9ca90e0e3c65
3
+ metadata.gz: b5274a3beb50960035ce3e72f5d4a6f0dbb73921958cc1321c2df01f192d28a4
4
+ data.tar.gz: e4cb2e3020d9b41ee0c6949d68251cf38c058b79451d03b1c65a2e8fddb5a5d5
5
5
  SHA512:
6
- metadata.gz: 197a224969a88b1a3df0652a7c42f1597e9b31068574ae4706f8d54710acc5597a1b45ef9deef164ad69c1b41155e7086d2b79d9e794dafd09fb1039247d55a9
7
- data.tar.gz: 224e1a0a69233c419a296fc0184de56a414b2a409f7d6a17bf82a831f746193ee7f87f46bd712dc24f23b1f707494978979594ff84cddd451a0810f3a7a3083b
6
+ metadata.gz: 9f37289e6bbcc57c933426dbdf7feb33acd9a69dd164d8fe9805c7e9d08b6da5a1c55f6526f80f5126722a11f5ba1a9cf8cdad6f2d966588b6d9b3de6240f448
7
+ data.tar.gz: df897be8ec356cec4c654b6e182539c03c4083dac42e04b54f5934ece1f7ccf9bd8e4e99775eaac5723c79097fd39a5423668f4d6a0d4f091f42686b5f127c71
@@ -28,11 +28,12 @@ module JetstreamBridge
28
28
 
29
29
  # -- Rails::Generators::Migration plumbing --
30
30
  def self.next_migration_number(dirname)
31
- if timestamped_migrations?
32
- Time.now.utc.strftime('%Y%m%d%H%M%S')
33
- else
34
- format('%.3d', current_migration_number(dirname) + 1)
35
- end
31
+ return format('%.3d', current_migration_number(dirname) + 1) unless timestamped_migrations?
32
+
33
+ current_timestamp = Time.now.utc.strftime('%Y%m%d%H%M%S').to_i
34
+ last_migration = current_migration_number(dirname) + 1
35
+
36
+ [current_timestamp, last_migration].max.to_s
36
37
  end
37
38
 
38
39
  def self.timestamped_migrations?
@@ -2,7 +2,7 @@
2
2
 
3
3
  class CreateJetstreamInboxEvents < ActiveRecord::Migration[<%= ActiveRecord::Migration.current_version %>]
4
4
  def change
5
- create_table :jetstream_inbox_events do |t|
5
+ create_table :jetstream_bridge_inbox_events do |t|
6
6
  # Event identification and deduplication
7
7
  t.string :event_id, null: false # unique event identifier for deduplication
8
8
  t.string :event_type, null: false # type of event (e.g., 'created', 'updated')
@@ -32,9 +32,9 @@ class CreateJetstreamInboxEvents < ActiveRecord::Migration[<%= ActiveRecord::Mig
32
32
  end
33
33
 
34
34
  # Indexes for efficient querying and deduplication
35
- add_index :jetstream_inbox_events, :event_id, unique: true
36
- add_index :jetstream_inbox_events, :status
37
- add_index :jetstream_inbox_events, :created_at
38
- add_index :jetstream_inbox_events, [:stream, :stream_seq], unique: true, where: 'stream IS NOT NULL AND stream_seq IS NOT NULL'
35
+ add_index :jetstream_bridge_inbox_events, :event_id, unique: true
36
+ add_index :jetstream_bridge_inbox_events, :status
37
+ add_index :jetstream_bridge_inbox_events, :created_at
38
+ add_index :jetstream_bridge_inbox_events, [:stream, :stream_seq], unique: true, where: 'stream IS NOT NULL AND stream_seq IS NOT NULL'
39
39
  end
40
40
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  class CreateJetstreamOutboxEvents < ActiveRecord::Migration[<%= ActiveRecord::Migration.current_version %>]
4
4
  def change
5
- create_table :jetstream_outbox_events do |t|
5
+ create_table :jetstream_bridge_outbox_events do |t|
6
6
  t.string :event_id, null: false
7
7
  t.string :subject, null: false
8
8
  t.jsonb :payload, null: false, default: {}
@@ -15,7 +15,7 @@ class CreateJetstreamOutboxEvents < ActiveRecord::Migration[<%= ActiveRecord::Mi
15
15
  t.timestamps
16
16
  end
17
17
 
18
- add_index :jetstream_outbox_events, :event_id, unique: true
19
- add_index :jetstream_outbox_events, :status
18
+ add_index :jetstream_bridge_outbox_events, :event_id, unique: true
19
+ add_index :jetstream_bridge_outbox_events, :status
20
20
  end
21
21
  end
@@ -4,5 +4,5 @@
4
4
  #
5
5
  # Version constant for the gem.
6
6
  module JetstreamBridge
7
- VERSION = '7.0.2'
7
+ VERSION = '7.0.4'
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jetstream_bridge
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.2
4
+ version: 7.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Attara