Just make it optional, changing the default in application.rb. I agree with
no foreign keys by default, since it is what happens right now.
You can't update rails and have all your migrations magically starting to
add FKs.

On Fri, Dec 2, 2011 at 9:32 AM, Rodrigo Rosenfeld Rosas
<rr.ro...@gmail.com>wrote:

> Em 01-12-2011 23:28, matthuhiggins escreveu:
>
>  Earlier this year, I had a discussion with Rails Core and they suggested
>> I make a pull request. I did:
>> https://rails.lighthouseapp.**com/projects/8994/tickets/**
>> 4347-add-foreign-key-support-**to-migrations-and-schemarb-**dump<https://rails.lighthouseapp.com/projects/8994/tickets/4347-add-foreign-key-support-to-migrations-and-schemarb-dump>
>>
>> I did not receive any feedback on my original request, so I went on
>> maintaining 
>> github.com/matthuhiggins/**foreigner<http://github.com/matthuhiggins/foreigner>.
>> I would happy to make an update to the patch, if it will be considered by
>> the Core team.
>>
>> While it is fruitless to debate the value of foreign keys to opponents
>> and proponents, it should be noted that the update I offered has zero
>> effect on those not using foreign keys. It's also worth suggesting that the
>> initial version can start with  no cascading options, so that all
>> application logic is kept in the application, and the foreign keys act as a
>> neutral constraint similar to NOT NULL.
>>
>
> I don't think this is right. A foreign key could be null. If you don't
> want it to be null you should be explicit about it.
>
> By the way, thanks for the foreigner gem.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Core" group.
> To post to this group, send email to 
> rubyonrails-core@googlegroups.**com<rubyonrails-core@googlegroups.com>
> .
> To unsubscribe from this group, send email to
> rubyonrails-core+unsubscribe@**googlegroups.com<rubyonrails-core%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at http://groups.google.com/**
> group/rubyonrails-core?hl=en<http://groups.google.com/group/rubyonrails-core?hl=en>
> .
>
>


-- 
Luiz Felipe G. Pereira

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to rubyonrails-core@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-core+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to