Files
audit-platform/审计项目管理平台/check_att.py
T
guwangtu b91954df4a
CI / check (push) Failing after 15m48s
chore: initial open-source baseline v1.0.0
Signed-off-by: 南通一次元科技有限公司 <guwangtu@icimeta.com>
2026-12-05 15:44:53 +00:00

31 lines
898 B
Python

# -*- coding: utf-8 -*-
import sqlite3, json
conn = sqlite3.connect(r'F:\审计项目管理平台\audit_data.db')
conn.row_factory = sqlite3.Row
# Check attachments table
cols = conn.execute("PRAGMA table_info(attachments)").fetchall()
print("=== attachments table columns ===")
for c in cols:
print(f" {c['name']}")
rows = conn.execute("SELECT * FROM attachments LIMIT 5").fetchall()
print(f"\n=== {len(rows)} attachment rows ===")
for r in rows:
for k in r.keys():
print(f" {k}: {r[k]}")
print("---")
# Check uploads directory
import os
upload_dir = r'F:\审计项目管理平台\uploads'
if os.path.exists(upload_dir):
files = os.listdir(upload_dir)
print(f"\n=== uploads dir: {len(files)} files ===")
for f in files[:10]:
fpath = os.path.join(upload_dir, f)
size = os.path.getsize(fpath)
print(f" {f} ({size} bytes)")
conn.close()