Sha256: 33380856408c1f0a0fee2b4333bdb00766d934694b21faff5b304170543ef40c

Contents?: true

Size: 381 Bytes

Versions: 10

Compression:

Stored size: 381 Bytes

Contents

class CreateOutboxerMessages < ActiveRecord::Migration[6.1]
  def change
    create_table :outboxer_messages do |t|
      t.references :message, polymorphic: true, null: false
      t.text :status, null: false

      t.timestamps
    end

    add_index :outboxer_messages, %i[status created_at]
    add_index :outboxer_messages, %i[message_type message_id], unique: true
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
outboxer-0.1.11 generators/outboxer/templates/migrations/create_outboxer_messages.rb
outboxer-0.1.10 generators/outboxer/templates/migrations/create_outboxer_messages.rb
outboxer-0.1.9 generators/outboxer/templates/migrations/create_outboxer_messages.rb
outboxer-0.1.8 generators/outboxer/templates/migrations/create_outboxer_messages.rb
outboxer-0.1.6 generators/outboxer/templates/migrations/create_outboxer_messages.rb
outboxer-0.1.5 generators/outboxer/templates/migrations/create_outboxer_messages.rb
outboxer-0.1.3 generators/outboxer/templates/migrations/create_outboxer_messages.rb
outboxer-0.1.2 generators/outboxer/templates/migrations/create_outboxer_messages.rb
outboxer-0.1.1 generators/outboxer/templates/migrations/create_outboxer_messages.rb
outboxer-0.1.0 generators/outboxer/templates/migrations/create_outboxer_messages.rb