Sha256: 452591993eca0892dd0e9e0f67ab13ecb8c8de41684fcf8de57a7d76379c7290

Contents?: true

Size: 654 Bytes

Versions: 2

Compression:

Stored size: 654 Bytes

Contents

class AddProgressToDelayedJobs < ActiveRecord::Migration

  def change
    change_table :delayed_jobs do |t|
      t.string    :identifier
      t.string    :record_type
      t.integer   :record_id
      t.string    :handler_class
      t.integer   :progress_current,  null: false, default: 0
      t.integer   :progress_max,      null: false, default: 100
      t.string    :message
      t.string    :error_message
      t.datetime  :completed_at
    end

    add_index :delayed_jobs, :identifier
    add_index :delayed_jobs, [:record_type, :record_id]
    add_index :delayed_jobs, :handler_class
    add_index :delayed_jobs, :completed_at
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
delayed_job_progress-0.0.3 lib/generators/delayed_job/templates/progress_migration.rb
delayed_job_progress-0.0.2 lib/generators/delayed_job/templates/progress_migration.rb