Sha256: b52475d728fe21544f0c9644b270a9aa83bc40acd00cc9253d2e3fdb9642b582

Contents?: true

Size: 898 Bytes

Versions: 48

Compression:

Stored size: 898 Bytes

Contents

# frozen_string_literal: true

class CreateGoodJobExecutions < ActiveRecord::Migration<%= migration_version %>
  def change
    reversible do |dir|
      dir.up do
        # Ensure this incremental update migration is idempotent
        # with monolithic install migration.
        return if connection.table_exists?(:good_job_executions)
      end
    end

    create_table :good_job_executions, id: :uuid do |t|
      t.timestamps

      t.uuid :active_job_id, null: false
      t.text :job_class
      t.text :queue_name
      t.jsonb :serialized_params
      t.datetime :scheduled_at
      t.datetime :finished_at
      t.text :error

      t.index [:active_job_id, :created_at], name: :index_good_job_executions_on_active_job_id_and_created_at
    end

    change_table :good_jobs do |t|
      t.boolean :is_discrete
      t.integer :executions_count
      t.text :job_class
    end
  end
end

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
good_job-3.17.2 lib/generators/good_job/templates/update/migrations/05_create_good_job_executions.rb.erb
good_job-3.17.1 lib/generators/good_job/templates/update/migrations/05_create_good_job_executions.rb.erb
good_job-3.17.0 lib/generators/good_job/templates/update/migrations/05_create_good_job_executions.rb.erb
good_job-3.16.4 lib/generators/good_job/templates/update/migrations/05_create_good_job_executions.rb.erb
good_job-3.16.3 lib/generators/good_job/templates/update/migrations/05_create_good_job_executions.rb.erb
good_job-3.16.2 lib/generators/good_job/templates/update/migrations/05_create_good_job_executions.rb.erb
good_job-3.16.1 lib/generators/good_job/templates/update/migrations/05_create_good_job_executions.rb.erb
good_job-3.16.0 lib/generators/good_job/templates/update/migrations/05_create_good_job_executions.rb.erb