Skip to content

Instantly share code, notes, and snippets.

@seak0503
Last active August 29, 2015 14:21
Show Gist options
  • Save seak0503/52a3865238132f806bca to your computer and use it in GitHub Desktop.
Save seak0503/52a3865238132f806bca to your computer and use it in GitHub Desktop.
Rails データベースの再作成をする方法

コマンド

bin/rake db:migrate:reset

説明

いったんデータベースを削除したうえで、新たにデータベースを作成し、 マイグレーションを実行する。 ちなみに、bin/rake db:migrateの場合は、繰り返し実行しても、一度マイグレートを 実行したスクリプトは2回目以降は実行されない。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment