0
1

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

【Ruby on Rails】rails dbでよく使うコマンド

Posted at

Ruby on Railsのデフォルト

SQLiteを起動

コマンドライン
$ rails db

SQLiteを終了

コマンドライン
sqlite> .quit もしくは .q

テーブル一覧を確認

コマンドライン
sqlite> .tables

テーブルの構造(スキーマ)を確認

コマンドライン
sqlite> .schema テーブル名

テーブルの中身を確認する

コマンドライン
sqlite> select * from テーブル名;
0
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?