refactor(admin,ui,test): 完善数据库迁移脚本,添加单元测试并调整前端配置

优化所有alembic迁移脚本的离线模式支持,添加已存在对象检查逻辑,避免重复执行出错。
为各个迁移脚本添加对应的单元测试,覆盖核心场景保障逻辑正确性。
修改前端配置文件,将默认API地址切换为线上服务器8.138.234.141:4000。
新增本地数据备份文件wonderq-local-data.dump和项目发布包wonderq-admin-release-20260823-01.tar。
This commit is contained in:
duanshuwen committed 2026-08-25 19:17:31 +08:00
1 parent d42f69bd47
commit 203781210c
17 files changed
+519 -120

No files matched your search

@@ -0,0 +1,14 @@
from importlib.util import module_from_spec, spec_from_file_location
from pathlib import Path
MIGRATION_PATH = Path(__file__).parents[1] / "alembic" / "versions" / "0023_detail_concierge_advisor.py"
SPEC = spec_from_file_location("detail_concierge_migration", MIGRATION_PATH)
assert SPEC and SPEC.loader
MIGRATION = module_from_spec(SPEC)
SPEC.loader.exec_module(MIGRATION)
def test_concierge_advisor_column_is_added_only_when_missing():
assert MIGRATION.should_add_concierge_advisor_column(set())
assert not MIGRATION.should_add_concierge_advisor_column({"id", "conciergeAdvisorId"})