[...] p. 324). Mostly what I found on the web about rails and foreign key constraints was a bunch of people talking about how they do use them and you’d be crazy and irresponsible not to. Yes, [...]
[...] with ruby on Rails project. Covers foreign key constraints, check constraints and partial indexes.http://tektastic.wordpress.com/2007/09/25/on-ruby-on-rails-with-postgresql-and-acts-as-paranoid/firstworks Programming with SQL Relay using the Ruby APIProgramming with sql Relay using the ruby [...]
Thanks; I didn’t know you could add additional db constraints in migrations. Your partial index is also way cool.
I agree re: using database-defined constraints: the database handles this more efficiently and complete than Rails; why not let the db handle this?
I know this is not the Rails philosophy at this time, but I think David’s philosophy might change once MySQL catches up w/ modern ODBMS features.
Thanks!
I believe MySQL now supports foreign keys, in fact the syntax shown here should work as is for mysql too. Not the check constraints though.
[...] p. 324). Mostly what I found on the web about rails and foreign key constraints was a bunch of people talking about how they do use them and you’d be crazy and irresponsible not to. Yes, [...]
[...] with ruby on Rails project. Covers foreign key constraints, check constraints and partial indexes.http://tektastic.wordpress.com/2007/09/25/on-ruby-on-rails-with-postgresql-and-acts-as-paranoid/firstworks Programming with SQL Relay using the Ruby APIProgramming with sql Relay using the ruby [...]