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 3 years have passed since last update.

Rails 個人的に覚えておきたいコマンド【初心者】

Posted at

##操作取り消し系

コントローラ作成~取り消し

コントローラ作成 ※例 ```rails generate controller StaticPages home help``` 取り消し ※上記で作成された関連ファイルもすべて削除される。 ```$ rails destroy controller StaticPages home help```

モデル作成~取り消し

モデル作成※例 ``` $ rails generate model User name:string email:string``` 取り消し※カラム名の指定は不要 ``` rails destroy model User```

migrate~取り消し

migrate実行 ```$ rails db:migrate``` 1つ前に戻す ```$ rails db:rollback``` 最初の状態に戻す ```$ rails db:migrate VERSION=0```
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?