[rspec-users] Foreign key constraints, fixtures, and rake task

Jay Levitt lists-rspec at shopwatch.org
Mon Aug 27 15:45:11 EDT 2007


Jim Deville wrote:

>>
> 
> Just wondering about your usage of constraints. We ran into this  
> issue recently and came to the conclusion that unless profiling shows  
> an issue, use AR to enforce referential integrity. You might be able  
> to get by using :dependent => :destroy, or one of the other options.  
> As for the indexing, you can set it up on your own using add_index in  
> the migration. That helps save us the headaches of migrations and  
> fixture issues.

Just the usual debate of "single layer of cleverness" vs. "defense in 
depth" against bugs.  It's not a performance thing; we're not at that 
level yet.

Jay



More information about the rspec-users mailing list