I've been looking at getting more and more information from the
underlying database and automatically inserting that into my models.
I've read many of the arguments, thoughts, and ideas about this. I
understand the different points of view. This sort of thing is more
for an integration database and not an application database, and I'm
using an integration database.
Also, I don't entirely know the etiquette of the list and I apologize
if pasting large blocks of code is gauche, but this is more of a
proof-of-concept request-for-comments than a finalized plugin or patch.
So this, below, is a stab at taking validation information from the
DDL. I was part-way through this before I learned about the
enforce_schema_rules and schema_validations plugins, but those weren't
exactly for me. I learned some from them, but there were some things I
needed to do differently.