Sha256: 11bdc75ab02047f1229ab6c559e3a9a9f182f8dfb526d3ca6d453f6738762c1a

Contents?: true

Size: 560 Bytes

Versions: 35

Compression:

Stored size: 560 Bytes

Contents

class CreateGoodJobs < ActiveRecord::Migration<%= migration_version %>
  def change
    enable_extension 'pgcrypto'

    create_table :good_jobs, id: :uuid do |t|
      t.text :queue_name
      t.integer :priority
      t.jsonb :serialized_params
      t.timestamp :scheduled_at
      t.timestamp :performed_at
      t.timestamp :finished_at
      t.text :error

      t.timestamps
    end

    add_index :good_jobs, :scheduled_at, where: "(finished_at IS NULL)"
    add_index :good_jobs, [:queue_name, :scheduled_at], where: "(finished_at IS NULL)"
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
good_job-1.9.6 lib/generators/good_job/templates/migration.rb.erb
good_job-1.9.5 lib/generators/good_job/templates/migration.rb.erb
good_job-1.9.4 lib/generators/good_job/templates/migration.rb.erb
good_job-1.9.3 lib/generators/good_job/templates/migration.rb.erb
good_job-1.9.2 lib/generators/good_job/templates/migration.rb.erb
good_job-1.9.1 lib/generators/good_job/templates/migration.rb.erb
good_job-1.9.0 lib/generators/good_job/templates/migration.rb.erb
good_job-1.8.0 lib/generators/good_job/templates/migration.rb.erb
good_job-1.7.1 lib/generators/good_job/templates/migration.rb.erb
good_job-1.7.0 lib/generators/good_job/templates/migration.rb.erb
good_job-1.6.0 lib/generators/good_job/templates/migration.rb.erb
good_job-1.5.0 lib/generators/good_job/templates/migration.rb.erb
good_job-1.4.1 lib/generators/good_job/templates/migration.rb.erb
good_job-1.4.0 lib/generators/good_job/templates/migration.rb.erb
good_job-1.3.6 lib/generators/good_job/templates/migration.rb.erb
good_job-1.3.5 lib/generators/good_job/templates/migration.rb.erb
good_job-1.3.4 lib/generators/good_job/templates/migration.rb.erb
good_job-1.3.3 lib/generators/good_job/templates/migration.rb.erb
good_job-1.3.2 lib/generators/good_job/templates/migration.rb.erb
good_job-1.3.1 lib/generators/good_job/templates/migration.rb.erb