feat: 增加 Git 标签清单策略和接口

This commit is contained in:
2026-07-20 06:45:26 +00:00
parent bc44ce8053
commit 801622904c
16 changed files with 356 additions and 3 deletions
+3
View File
@@ -55,6 +55,9 @@ async def lifespan(app: FastAPI):
license_columns = {row[1] for row in cur.execute("PRAGMA table_info(licenses)").fetchall()}
if "license_key_cipher" not in license_columns:
cur.execute("ALTER TABLE licenses ADD COLUMN license_key_cipher TEXT NOT NULL DEFAULT ''")
policy_columns = {row[1] for row in cur.execute("PRAGMA table_info(version_policies)").fetchall()}
if "git_tags_enabled" not in policy_columns:
cur.execute("ALTER TABLE version_policies ADD COLUMN git_tags_enabled INTEGER NOT NULL DEFAULT 0")
audit_columns = {row[1] for row in cur.execute("PRAGMA table_info(admin_audit_logs)").fetchall()}
if "actor_username" not in audit_columns:
cur.execute("ALTER TABLE admin_audit_logs ADD COLUMN actor_username TEXT NOT NULL DEFAULT ''")