|
|
|
|
|
by callmeed
3859 days ago
|
|
I use the annotate gem in all my RoR projects. It adds comments to the model files based on the structure of the DB table. I find it very helpful. Haven't really thought about taking it a step further and _enforcing_ it with code. https://github.com/ctran/annotate_models |
|
I think the biggest problem for our team is that people will have differing migrations on their respective branches. When they move around to other branches, these migrations will cause parts of the code to break, and it can be difficult to diagnose why. Enforcing the schema up front prevents these issues and helps us avoid stale/incorrect database state.