i type: rails g migration AddFieldToTable field:references
result:
class AddFieldToTable < ActiveRecord::Migration
  def change
    add_column :tables, :field, :references
  end
end

there is no migrations there or i type wrong, on pgSQL, rails 3.2





On Wednesday, October 31, 2012 12:01:31 PM UTC+1, rtdp wrote:
>
> I use rails 3.2 and by default it does add indexes if column type is 
> specified as references.
>
> --
> Ratnadeep Deshmane.
> http://appsurfer.com
> http://rainingclouds.com
> http://twitter.com/rtdp
>
>
>
> On Tue, Oct 30, 2012 at 10:59 PM, Tino <[email protected] <javascript:>
> > wrote:
>
>> Hello, just asking for first time here...
>>
>> if you do in console: 
>>
>> rails g migration *AddReferenceidToModel *type:*references* 
>>
>> would you expect that Rails add index for reference_id field, cause it 
>> make sense always add index on field like that.
>>
>> i did that on my fork and it makes me happy every time I scaffold and 
>> forgot some fields ...
>> :)
>>
>> regards, Tino
>>
>>
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Ruby on Rails: Core" group.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msg/rubyonrails-core/-/zpRD_04wfZQJ.
>> To post to this group, send email to 
>> [email protected]<javascript:>
>> .
>> To unsubscribe from this group, send email to 
>> [email protected] <javascript:>.
>> For more options, visit this group at 
>> http://groups.google.com/group/rubyonrails-core?hl=en.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-core/-/FCfWbVmMXB4J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to