News for hackers. Stuff that matters.
Re:Show HN: Enforced, Annotated Schema for Ruby Sequel Models by callmeed on Monday November 30, 2015 @11:34PM (#10653648)
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

Re:Show HN: Enforced, Annotated Schema for Ruby Sequel Models by karthikksv on Tuesday December 01, 2015 @12:20AM (#10653785)
Ah, yes, I've used something similar in the past too. It's great for being able to see what fields you can access, but it's not guaranteed to be up-to-date with the database.

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.

Re:Show HN: Enforced, Annotated Schema for Ruby Sequel Models by spacemanmatt on Tuesday December 01, 2015 @05:31AM (#10654500)
As far as I can tell from the README this suffers the same abstraction leak as most ORMs. Relations are not objects no matter how big your hammer is.