1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-21 14:19:39 +02:00
Maybe/db/migrate/20240709113714_create_good_job_process_lock_ids.rb
Tony Vincent de5a2e55b3
Add missing migrations for good_job 4x (#967)
* Goodjob 3.99

* Properly bump to good_job 4.0.0

* Remove accidently tracked .tool-versions
2024-07-09 14:23:19 -04:00

18 lines
579 B
Ruby

# frozen_string_literal: true
class CreateGoodJobProcessLockIds < ActiveRecord::Migration[7.2]
def change
reversible do |dir|
dir.up do
# Ensure this incremental update migration is idempotent
# with monolithic install migration.
return if connection.column_exists?(:good_jobs, :locked_by_id)
end
end
add_column :good_jobs, :locked_by_id, :uuid
add_column :good_jobs, :locked_at, :datetime
add_column :good_job_executions, :process_id, :uuid
add_column :good_job_processes, :lock_type, :integer, limit: 2
end
end