Sha256: 26d8d54aff095f56666ecbbac88e48d3f3676a40f3fd95612041f7e4ce77e5d0

Contents?: true

Size: 667 Bytes

Versions: 10

Compression:

Stored size: 667 Bytes

Contents

# frozen_string_literal: true
class CreateGoodJobs < ActiveRecord::Migration[5.2]
  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)", name: "index_good_jobs_on_scheduled_at"
    add_index :good_jobs, [:queue_name, :scheduled_at], where: "(finished_at IS NULL)", name: :index_good_jobs_on_queue_name_and_scheduled_at
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
good_job-1.99.2 lib/generators/good_job/templates/update/migrations/01_create_good_jobs.rb
good_job-1.99.1 lib/generators/good_job/templates/update/migrations/01_create_good_jobs.rb
good_job-1.99.0 lib/generators/good_job/templates/update/migrations/01_create_good_jobs.rb
good_job-1.13.2 lib/generators/good_job/templates/update/migrations/01_create_good_jobs.rb
good_job-1.13.1 lib/generators/good_job/templates/update/migrations/01_create_good_jobs.rb
good_job-1.13.0 lib/generators/good_job/templates/update/migrations/01_create_good_jobs.rb
good_job-1.12.2 lib/generators/good_job/templates/update/migrations/01_create_good_jobs.rb
good_job-1.12.1 lib/generators/good_job/templates/update/migrations/01_create_good_jobs.rb
good_job-1.12.0 lib/generators/good_job/templates/update/migrations/01_create_good_jobs.rb
good_job-1.11.3 lib/generators/good_job/templates/update/migrations/01_create_good_jobs.rb