0
0

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 1 year has passed since last update.

railsにおけるテーブル修正の流れ

Posted at

はじめに

テーブル設計を誤り、実行する中で間違いに気がついたとき、どのようにテーブルの修正を行えば良いかわからなくなってしまったため、記録に残す。
誤っている解釈があれば、ご指摘お願いします。

テーブルの修正で気にかけること

  • マイグレショーンファイルのstatusをup→downへ変更
    rails db:migrate:statusでstatus状況を確認→rails db:rollback
  • モデルの削除
    rails d model モデル名
    (マイグレーションファイルも同時に消される)
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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?