4
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

rails db:seed 重複データを削除する方法

Posted at

rails db:seedは上書きされると勘違いしており、
rails cで確認するとデータが重複していた。
データベースの中身をリセットしてから、再度 rails db:seedを実行する。

$ rails db:seed:reset
$ rails db:seed
4
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?