①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 と書く
More than 3 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme