feat: add takeover fields to Authorization model

Add takeover_enabled, takeover_mode, and takeover_delay_seconds columns
to the Authorization model with a SQLite migration, and include them
in to_dict(). Test: test_takeover_model.py.
This commit is contained in:
stefanfeng
2026-08-07 16:30:29 +08:00
parent 76f0730b57
commit 7327939b4d
4 changed files with 65 additions and 0 deletions
+3
View File
@@ -35,6 +35,9 @@ def init_db():
("knowledge_docs", "chunk_count", "INTEGER DEFAULT 0"),
("knowledge_docs", "vectorized_at", "TIMESTAMP"),
("avatars", "owner_id", "VARCHAR DEFAULT ''"),
("authorizations", "takeover_enabled", "BOOLEAN DEFAULT 0"),
("authorizations", "takeover_mode", "VARCHAR DEFAULT 'immediate'"),
("authorizations", "takeover_delay_seconds", "INTEGER DEFAULT 30"),
)