13
11

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 5 years have passed since last update.

rails db:resetとrails db:migrate:resetの違い

Posted at

##rails db:reset

  • データベースを全て削除
  • schema.rbに書かれている内容を元にデータベースを作成
  • seeds.rbに書かれているサンプルデータを読み込む

##rails db:migrate:reset

  • データベースを全て削除
  • マイグレーションファイルを古い順に全て実行

自分は基本的にこちらを利用します。
注意点として、seed.rbの読み込みは行わないので、rails db:seedを手動で実行する必要があります。

13
11
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
13
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?