Recent Posts by Luke Francl
|
Jan 10, 2008
|
Topic: General Ruby/Rails Discussion / MySQL Error 150 when trying to create foreign keys in migration I admit that I haven’t been using foreign key constraints since I started using Rails, but as a number of people in your comment thread have noted, there are some troubling problems with ActiveRecord validations. I did work on one project that used DB constraints with Postgres and Rails. It had some annoying aspects to it, because the model would get changed but not the database constraints. This led to some problems, like records that couldn’t be deleted because doing so would violate a constraint. So if you do use ‘em, make sure you keep your DB in synch with your Rails validations. |