(db_type: str = None)
| 75 | |
| 76 | |
| 77 | async 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 |
no test coverage detected