24th Thu
annotate_modelsにindexの情報を付加する
annotate_models
は、テーブルの情報をModelとFixtureのファイルに
コメントとして書き込んでくれる非常に便利なプラグインです。
永く愛用しているプラグインの一つなのですが、
しばらくメンテナンスされていないようなので、
欲しいと思っていたindexに関する情報も出力するようにしてみました。
http://svn.s21g.com/public/rails/plugins/annotate_models_with_index/
こんな感じに、インデックス情報をカラムごとに付加します。
rails>>
== Schema Information
Schema version: 48
Table name: users
id :integer(11) not null, primary key
(* snip *)
mobile_email :string(255) index_users_on_mobile_email(unique)
<<--
posted by
genki on Thu 24 Jan 2008 at 01:10 with 0 comments