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

#データベース

データベースを一度削除して初期化

rails db:migrate:reset

→database "api_development" is being accessed by other users
データベース構造を前に戻す=ロールバック

rails db:rollback

###データベースを操作

rails dbconsole
.table
.schema users(スキーマ=構造)
.quit
rails c
Post.find(1).destroy //id1を削除
用語 意味
マイグレーションファイル= データベースを生成する際の設計図
レコード 一行!横!

rails db:migrate:status

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?