Hello all, rake test_units fails with a message that there is an error in the SQL syntax near foreign_key_check = 0. The error appears to occur while running the ''clone_structure_to_test'' task. When I comment out the guilty-looking line in the Rakefile #ActiveRecord::Base.connection.execute(''SET foreign_key_checks = 0'') the error goes away. Since I don''t know what that line was doing and I''d rather not mess with/ pollute the standard Rakefile --- would someone tell me what that line was doing and what a better fix would be? Thanks, --Brian _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
> > #ActiveRecord::Base.connection.execute(''SET foreign_key_checks = 0'') > > the error goes away. Since I don''t know what that line was doing > and I''d rather not mess with/ pollute the standard Rakefile --- > would someone tell me what that line was doing and what a better > fix would be?Setting that value to 0 will allow you to insert data into your tables without checking for dependencies. For example, if you have several people who belong to organization id #5, but organization id #5 doesn''t exist, then MySQL would throw an error stating that the insert wasn''t allowed because the foreign key constraint was violated. Duane Johnson (canadaduane)