
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Run data migrations along side schema migrations for Sequel. Inspired by https://github.com/ilyakatz/data-migrate.
Data migrations are stored in db/data. They act like schema migrations, except they should be reserved for data migrations. For instance, if you realize you need to titleize all your titles, this is the place to do it.
The code is ported from Sequel migration extension.
Install the gem and add to the application's Gemfile by executing:
$ bundle add sequel-data-migrate
If bundler is not being used to manage dependencies, install the gem by executing:
$ gem install sequel-data-migrate
Configure your database:
SequelData::Migrate.configure do |config|
config.db_configuration.host = ENV.fetch('DATABASE_URL')
config.migration_path = 'db/data_migration' # default value is db/data
end
Add the rake task to Rakelib
file in your project:
require 'sequel_data/migrate/rake_task'
task 'data:migrate' => :environment
task 'data:rollback' => :environment
Now you can migrate using rake data:migrate
and rollback using rake data:rollback
.
To create new migration file, you can use data:create_migration
rake task:
bundle exec rake data:create_migration\[<file_name>\]
After checking out the repo, run bin/setup
to install dependencies.
Then, run rake spec
to run the tests.
You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
.
To release a new version, update the version number in version.rb
,
and then run bundle exec rake release
, which will create a git tag for the version,
push git commits and the created tag, and push the .gem
file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/kaligo/sequel-data-migrate.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that sequel-data-migrate demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.