DEV Community

Shinichi Maeshima
Shinichi Maeshima

Posted on

Released seed-do v4.0.0

I maintain seed-do, which is a fork of seed-fu updated to work with the latest Ruby and Rails. This time, I added performance improvements and released it as v4.0.0.

Main changes

By using SeedDo.seed(bulk: true), you can now UPSERT records in bulk using Rails' upsert_all. Here is the PR: Enable bulk upsert in SeedDo.seed by willnet ยท Pull Request #26 ยท willnet/seed-do

For most people, simply replacing SeedDo.seed with SeedDo.seed(bulk: true) should make seeding faster.

However, because this feature uses the :unique_by option of upsert_all, it only works with PostgreSQL and SQLite. Sorry to MySQL users.

Also, while adding this feature, I reorganized the internal API, which caused breaking changes. So I bumped the major version. If you are not using the internal API, this should not affect you.

If you try it, I would be happy to hear your feedback.

Top comments (0)