I wrote about how to write seeds.rb that can be used when putting dummy data in the database using seed.
When writing data in seeds.rb
seeds.rb
User.create!(name: ...)
By adding! After create as described above, an error will be displayed when data registration fails in the database.