Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Migrate handler of text column to json column for delayed_job.
Add this line to your application's Gemfile:
gem 'delayed_job_json'
And then execute:
$ bundle
Generate migration files:
$ rails generate delayed_job_json:migration
Edit generated files and leave codes only for your database. An example of generated file is shown as follows:
class AddPayloadToDelayedJobs < ActiveRecord::Migration[7.0]
def up
case ENV['DATABASE']
when 'postgresql'
add_column :delayed_jobs, :payload, :jsonb, null: false, default: {}
add_index :delayed_jobs, :payload, using: :gin
when 'mysql'
add_column :delayed_jobs, :payload, :json
else
add_column :delayed_jobs, :payload, :json, null: false, default: {}
end
end
def down
case ENV['DATABASE']
when 'postgresql'
remove_column :delayed_jobs, :payload, :jsonb, null: false, default: {}
when 'mysql'
remove_column :delayed_jobs, :payload, :json
else
remove_column :delayed_jobs, :payload, :json, null: false, default: {}
end
end
end
Then run migration:
$ rake db:migrate
This migration adds payload
column to delayed_jobs table, and YAML data in handler
column is migrated to payload
as json data.
Bug reports and pull requests are welcome on GitHub at https://github.com/kanety/delayed_job_json.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that delayed_job_json demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.