WIP metadata_sql WARN:broken
Updated metadata_sql, WARN: not thoroughly tested
Merge pull request #51 from mpevner/master

create_metadata_sql