Sha256: 379f732b22d9d790bfbd3d9e21952a7587ac9523c4b94899eb2b1aac47bfaa67

Contents?: true

Size: 739 Bytes

Versions: 3

Compression:

Stored size: 739 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

3 entries across 3 versions & 1 rubygems

Version Path
outboxable-0.1.2 lib/templates/create_outboxable_outboxes.rb
outboxable-0.1.1 lib/templates/create_outboxable_outboxes.rb
outboxable-0.1.0 lib/templates/create_outboxable_outboxes.rb