-# Global metadata. If you have multiple databases with overlapping table
-# names, you'll need a metadata for each database
-metadata = MetaData()
+# Base class for declarative; creates its own metadata object
+TableBase = declarative_base()
+metadata = TableBase.metadata