支持家庭成员显示名编辑

This commit is contained in:
stu2not
2026-06-08 11:46:14 +08:00
parent dcff337f43
commit ac9d669107
10 changed files with 255 additions and 6 deletions

View File

@@ -170,6 +170,7 @@ async def _ensure_device_family_tables(conn) -> None:
device_id VARCHAR(64) NOT NULL,
user_id BIGINT NOT NULL,
role TINYINT NOT NULL DEFAULT 2,
display_name VARCHAR(64) NULL,
status TINYINT NOT NULL DEFAULT 1,
invited_by_user_id BIGINT NULL,
joined_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
@@ -195,6 +196,13 @@ async def _ensure_device_family_tables(conn) -> None:
"""
)
)
await _ensure_columns(
conn,
table_name="device_family_members",
columns=[
("display_name", "display_name VARCHAR(64) NULL AFTER role"),
],
)
await conn.execute(
text(
"""