Edge Rails

[Edge Rails] DBコンソールを楽に起動:DB Console

2008/05/28

Rails 2.0.91 が使えるようになり、2.1 リリースも間近なようです(2.0.91などマイナーアップデートのものを利用したい場合はこちらを参照してください)。

今回の Edge Rails は、2.0.91 より使えるようになった DB Console です。
これは Rails プロジェクト配下のscript/にあるスクリプトで、使っているDBのコンソールを起動することができます。IDやPWなどの設定情報は、Railsプロジェクトと同じconfig/database.ymlのものが使われます。

$ script/dbconsole
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.0.51a Source distribution
 
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
 
mysql>

これはMySQLでの例ですが、使っているDBがSQLiteならばSQLiteのコンソールが起動します。

複数のアプリでユーザなどを使い分けている人には特に便利な機能です。

# Ryan’s Scraps の更新を見逃していました。。。


related posts


tags

,


have your say

Add your comment below, or trackback from your own site. Subscribe to these comments.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="">

:

:


« RESTfulなRailsをtelnetで試す
» フレキシブルなto_xml