fix: 修复windows系统下初始化表结构编码问题
This commit is contained in:
parent
85727da1d3
commit
7e9a759d94
2
db.py
2
db.py
|
@ -85,7 +85,7 @@ async def init_table_schema():
|
|||
utils.logger.info("[init_table_schema] begin init mysql table schema ...")
|
||||
await init_mediacrawler_db()
|
||||
async_db_obj: AsyncMysqlDB = media_crawler_db_var.get()
|
||||
async with aiofiles.open("schema/tables.sql", mode="r") as f:
|
||||
async with aiofiles.open("schema/tables.sql", mode="r", encoding="utf-8") as f:
|
||||
schema_sql = await f.read()
|
||||
await async_db_obj.execute(schema_sql)
|
||||
utils.logger.info("[init_table_schema] mediacrawler table schema init successful")
|
||||
|
|
Loading…
Reference in New Issue