LoginSignup
10
14

More than 5 years have passed since last update.

Rails db:seed二重登録解除

Posted at

db:seedの内容を書き換えて更新

そのままrails db:seedを実行すると、二重登録となってしまい、seedの内容を編集した時の更新は出来ない為

rails db:migrate:reset

上記コマンドを実行した後にrails db:seedとすることで、再登録出来る。

参考サイト
Railsでrake db:seedをやり直す

10
14
0

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
10
14