Sha256: f113674b649e61c13bb46bb3388f033ea85b7293a55fcb0f61ef5d2954d0d9da

Contents?: true

Size: 738 Bytes

Versions: 12

Compression:

Stored size: 738 Bytes

Contents

class CreateOutboxableOutboxes < ActiveRecord::Migration[7.0]
  def change
    enable_extension 'pgcrypto' unless extension_enabled?('pgcrypto')

    create_table :outboxes, id: :uuid, default: 'gen_random_uuid()' do |t|
      t.integer :status, null: false, default: 0

      t.string :exchange, null: false, default: ''
      t.string :routing_key, null: false, default: ''

      t.integer  :attempts, null: false, default: 0
      t.datetime :last_attempted_at, null: true
      t.datetime :retry_at, null: true

      t.jsonb :payload, default: {}
      t.jsonb :headers, default: {}

      t.integer :size, null: false, default: 0

      t.references :outboxable, polymorphic: true, null: true

      t.timestamps
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
outboxable-1.0.6 lib/templates/create_outboxable_outboxes.rb
outboxable-1.0.5 lib/templates/create_outboxable_outboxes.rb
outboxable-1.0.4 lib/templates/create_outboxable_outboxes.rb
outboxable-1.0.3 lib/templates/create_outboxable_outboxes.rb
outboxable-1.0.2 lib/templates/create_outboxable_outboxes.rb
outboxable-1.0.0 lib/templates/create_outboxable_outboxes.rb
outboxable-0.1.8 lib/templates/create_outboxable_outboxes.rb
outboxable-0.1.7 lib/templates/create_outboxable_outboxes.rb
outboxable-0.1.6 lib/templates/create_outboxable_outboxes.rb
outboxable-0.1.5 lib/templates/create_outboxable_outboxes.rb
outboxable-0.1.4 lib/templates/create_outboxable_outboxes.rb
outboxable-0.1.3 lib/templates/create_outboxable_outboxes.rb