Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Some kind of automatic adding index on forgotten migrations
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
tino  
View profile  
 More options Oct 31 2012, 3:49 pm
From: tino <tino.zoroto...@gmail.com>
Date: Wed, 31 Oct 2012 12:49:51 -0700 (PDT)
Local: Wed, Oct 31 2012 3:49 pm
Subject: Re: [Rails-core] Some kind of automatic adding index on forgotten migrations

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 <tino.zo...@gmail.com <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 rubyonra...@googlegroups.com<javascript:>
>> .
>> To unsubscribe from this group, send email to
>> rubyonrails-co...@googlegroups.com <javascript:>.
>> For more options, visit this group at
>> http://groups.google.com/group/rubyonrails-core?hl=en.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.