LoginSignup
0
0

More than 1 year has passed since last update.

Railsのデータベースのdropからseedまでを一瞬でやりたい

Posted at

railsの初期値(seedの内容)を変更して作り直す場合、一度データベースをdropしてseedを実行し直す必要がある。
開発初期など実験や試行錯誤している段階では頻繁に多用するかと思うので、上記作業を一瞬で行うコマンドをメモしておきます。

drop, create, migrateを一括で行う

rails db:migrate:reset

seedを実行

rails db:seed

以上!!

0
0
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
0
0