MCPcopy Create free account
hub / github.com/NanmiCoder/MediaCrawler / create_tables

Function create_tables

database/db_session.py:77–84  ·  view source on GitHub ↗
(db_type: str = None)

Source from the content-addressed store, hash-verified

75
76
77async def create_tables(db_type: str = None):
78 if db_type is None:
79 db_type = config.SAVE_DATA_OPTION
80 await create_database_if_not_exists(db_type)
81 engine = get_async_engine(db_type)
82 if engine:
83 async with engine.begin() as conn:
84 await conn.run_sync(Base.metadata.create_all)
85
86
87@asynccontextmanager

Callers 1

init_table_schemaFunction · 0.90

Calls 3

get_async_engineFunction · 0.85
beginMethod · 0.45

Tested by

no test coverage detected