Created
August 21, 2023 22:56
-
-
Save Filimoa/f7a67de0d7b7d9c9693253f00a20a045 to your computer and use it in GitHub Desktop.
Multiple Bases Getting Combined SqlAlchemy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from src.app.db.base import Base as AppBase # noqa | |
from src.b2b.db.base import Base as B2BBase # noqa | |
target_metadata = MetaData() | |
for table in AppBase.metadata.tables.values(): | |
table.tometadata(target_metadata) | |
for table in B2BBase.metadata.tables.values(): | |
table.tometadata(target_metadata) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment