feat(cli,database): 更新数据库引擎创建模式
This commit is contained in:
@@ -4,7 +4,8 @@ from importlib.util import find_spec
|
||||
from pathlib import Path
|
||||
from typing import Mapping
|
||||
|
||||
from nyahome.cli.cli import console, db_driver_available, db_type_allowlist
|
||||
from nyahome.cli.cli import console
|
||||
from nyahome.database.engine import db_driver_available, db_type_allowlist
|
||||
|
||||
|
||||
class CliWarning:
|
||||
@@ -73,7 +74,7 @@ def check_database_type(environ: Mapping[str, str | None]) -> None:
|
||||
if not db_host:
|
||||
cw.warning("NYAHOME_DB_HOST 未设置,将使用 [cyan]localhost[/cyan] 作为默认值。")
|
||||
if not db_port:
|
||||
cw.warning("NYAHOME_DB_PORT 未设置,将使用 [cyan]3006[/cyan] 作为默认值。")
|
||||
cw.warning("NYAHOME_DB_PORT 未设置,将使用 [cyan]3306[/cyan] 作为默认值。")
|
||||
cw.info("自检未检查数据库状态是否可用。")
|
||||
else:
|
||||
cw.info("使用 sqlite 数据库,跳过数据库凭证检查。")
|
||||
|
||||
Reference in New Issue
Block a user