Thursday, November 12, 2009

[Rails] Re: DB Table Constraints using code or not! Best practices?

Aaron Turner wrote:

FWIW, I use the foreign_key_migrations plugin which defines FK's in my
migrations for me. I do this because:

1) I don't trust ActiveRecord to ensure my relations are sane
2) I don't always use ActiveRecord to interact with my DB

Marnen Laibow-Koser wrote:
I do likewise, for the same reasons. I understand there's now a similar
plugin called Foreigner, but I've never used it.

-------------

Add another +1 for the foreign_key_migrations plugin.
If some other person, or some other application will ever connect to
your database (happens all the time here at work), defend it at the db
level.
--
Posted via http://www.ruby-forum.com/.

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate