feat: 增加 Git 标签清单策略和接口
This commit is contained in:
@@ -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 ''")
|
||||
|
||||
Reference in New Issue
Block a user