feat(douyu): 完成账号平台阶段一到四并接入最新协议

This commit is contained in:
yml
2026-11-21 23:51:41 +08:00
parent d67b7dd6a3
commit 0ac6c7e82e
19 changed files with 2163 additions and 396 deletions
+5 -3
View File
@@ -12,6 +12,8 @@ from sqlalchemy import create_engine, inspect, text
import web.backend.database as database_module
from tests.support.db import get_mysql_credentials
TARGET_REVISION = "20261106_0065"
def test_0065_upgrade_downgrade_roundtrip():
creds = get_mysql_credentials()
@@ -91,7 +93,7 @@ def test_0065_upgrade_downgrade_roundtrip():
},
)
command.upgrade(cfg, "head")
command.upgrade(cfg, TARGET_REVISION)
insp = inspect(engine)
cols = {c["name"] for c in insp.get_columns("accounts")}
@@ -144,7 +146,7 @@ def test_0065_upgrade_downgrade_roundtrip():
},
)
conn.execute(text("UPDATE alembic_version SET version_num='20261021_0064'"))
command.upgrade(cfg, "head")
command.upgrade(cfg, TARGET_REVISION)
with engine.connect() as conn:
resumed = conn.execute(
text(
@@ -200,7 +202,7 @@ def test_0065_upgrade_downgrade_roundtrip():
assert old_values["downgrade-1"] == ["套装-兔兔白日梦"]
assert old_values["downgrade-2"] == ["套装-兔兔白日梦", "套装-狂战萌兔"]
command.upgrade(cfg, "head")
command.upgrade(cfg, TARGET_REVISION)
insp = inspect(engine)
cols = {c["name"] for c in insp.get_columns("accounts")}
assert "high_value_owned" not in cols