Foreign keys in Ruby on Rails
For a long time I have been searching for built-in foreign keys in Ruby on Rails. For some reason, the core developers don’t think it’s particularly important. I don’t know why. I think foreign key constraints are absolutely essential, but who am I?
The sad state of foreign key constraints is reflected in the amount of plugins available (very few) and the quality of them (poor, or abandoned). Until now! I discovered Foreigner, a well-maintained gem on github/gemcutter that allows me to add foreign keys inside migrations. I just tried it out and it works very well. I have a feeling this will finally allow me to develop on SQLite locally and PostgreSQL on the server.
No comments yet.