Implemented writing out the schema of generated tables.
Merge branch 'write-schema'