]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
Make call to declarative_base clear in example.
authorJack Grahl <jack.grahl@gmail.com>
Fri, 29 Jun 2018 15:21:00 +0000 (15:21 +0000)
committerJack Grahl <jack.grahl@gmail.com>
Fri, 29 Jun 2018 15:21:00 +0000 (15:21 +0000)
Having this function call in the example code makes it 100% clear that Base has to be initialized with the metadata object, and how to do this.

docs/build/naming.rst

index a630011b0880aa19057b684ed5a0024fd6b9b6ab..4d22890a8672aac4cf8e1628c65d560f7c178d21 100644 (file)
@@ -166,6 +166,7 @@ used::
             "fk": "fk_%(table_name)s_%(column_0_name)s_%(referred_table_name)s",
             "pk": "pk_%(table_name)s"
           })
+    Base = declarative_base(metadata=meta)
 
     # .. in your Alembic env.py: