updating script to create metadata tables