0
0

More than 3 years have passed since last update.

マイグレーションファイルを削除する方法

Posted at

①rails db:migrate:status で現在のマイグレーションファイルの状況を確認
②マイグレーションテーブルにversionがあればup、無ければdownとなっている。
③upの場合は rails db:migrate:down VERSION=(Migration ID入力) でdownにしてあげる
④最後に rm db/migrate/(Migration ID入力)_(※migration_name).rb で削除できる
※Create microposts の場合は、全て小文字にし、 create_microposts と書く

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