A handy reference for generating migrations in your Ruby on Rails app — I cover the basics like adding columns and tables, adjusting column types (and loads more), plus some tips and tricks...
We use the faker gem to seed our database with 10,000 fake posts. Then, we're going to speed up seeding by 9.4x, using either upsert_all or the activerecord-import gem.
This method to split your database seeds by Rails environment is clean and simple, and is perfect to split up your `seeds.rb` file. It's a brilliant method! I just wish I'd thought of it first 😅