Update Ruby gems and Yarn packages.
This commit is contained in:
14
db/migrate/20220110171021_add_cron_at_to_good_jobs.rb
Normal file
14
db/migrate/20220110171021_add_cron_at_to_good_jobs.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
# frozen_string_literal: true
|
||||
class AddCronAtToGoodJobs < ActiveRecord::Migration[7.0]
|
||||
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, :cron_at)
|
||||
end
|
||||
end
|
||||
|
||||
add_column :good_jobs, :cron_at, :timestamp
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,20 @@
|
||||
# frozen_string_literal: true
|
||||
class AddCronKeyCronAtIndexToGoodJobs < ActiveRecord::Migration[7.0]
|
||||
disable_ddl_transaction!
|
||||
|
||||
def change
|
||||
reversible do |dir|
|
||||
dir.up do
|
||||
# Ensure this incremental update migration is idempotent
|
||||
# with monolithic install migration.
|
||||
return if connection.index_name_exists?(:good_jobs, :index_good_jobs_on_cron_key_and_cron_at)
|
||||
end
|
||||
end
|
||||
|
||||
add_index :good_jobs,
|
||||
[:cron_key, :cron_at],
|
||||
algorithm: :concurrently,
|
||||
name: :index_good_jobs_on_cron_key_and_cron_at,
|
||||
unique: true
|
||||
end
|
||||
end
|
||||
17
db/migrate/20220110171023_create_good_job_processes.rb
Normal file
17
db/migrate/20220110171023_create_good_job_processes.rb
Normal file
@@ -0,0 +1,17 @@
|
||||
# frozen_string_literal: true
|
||||
class CreateGoodJobProcesses < ActiveRecord::Migration[7.0]
|
||||
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_processes)
|
||||
end
|
||||
end
|
||||
|
||||
create_table :good_job_processes, id: :uuid do |t|
|
||||
t.timestamps
|
||||
t.jsonb :state
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,25 @@
|
||||
# frozen_string_literal: true
|
||||
class IndexGoodJobJobsOnFinishedAt < ActiveRecord::Migration[7.0]
|
||||
disable_ddl_transaction!
|
||||
|
||||
def change
|
||||
reversible do |dir|
|
||||
dir.up do
|
||||
# Ensure this incremental update migration is idempotent
|
||||
# with monolithic install migration.
|
||||
return if connection.index_name_exists?(:good_jobs, :index_good_jobs_on_active_job_id)
|
||||
end
|
||||
end
|
||||
|
||||
add_index :good_jobs,
|
||||
[:active_job_id],
|
||||
name: :index_good_jobs_on_active_job_id,
|
||||
algorithm: :concurrently
|
||||
|
||||
add_index :good_jobs,
|
||||
[:finished_at],
|
||||
where: "retried_good_job_id IS NULL AND finished_at IS NOT NULL",
|
||||
name: :index_good_jobs_jobs_on_finished_at,
|
||||
algorithm: :concurrently
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user