For anyone curious, I'm 95% of the way there. This will handle nearly all situations and sort the field names for you, and it even gives you a few options. It's not optimized and there are a few things it won't do, but it handles field names, field types, field sizes, indexes, and primary...