annotate_models は、テーブルの情報をModelとFixtureのファイルに コメントとして書き込んでくれる非常に便利なプラグインです。

永く愛用しているプラグインの一つなのですが、 しばらくメンテナンスされていないようなので、 欲しいと思っていたindexに関する情報も出力するようにしてみました。

http://svn.s21g.com/public/rails/plugins/annotate_models_with_index/

こんな感じに、インデックス情報をカラムごとに付加します。

   1  # == Schema Information
   2  # Schema version: 48
   3  #
   4  # Table name: users
   5  #
   6  #  id           :integer(11)   not null, primary key
   7     (* snip *)
   8  #  mobile_email :string(255)   index_users_on_mobile_email(unique)

posted by Png genki on Thu 24 Jan 2008 at 01:09

Comments:

or Preview
Social Bookmarks
  • Delicious
  • B_entry318
  • Clip_16_12_w
Services from s21g
twpro(ツイプロ)
Twitterプロフィールを快適検索
地価2009
土地の値段を調べてみよう
MyRestaurant
自分だけのレストラン手帳
Formula
ブログに数式を埋め込める数式コミュニティ