CI / check (push) Failing after 15m48s
Signed-off-by: 南通一次元科技有限公司 <guwangtu@icimeta.com>
31 lines
898 B
Python
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()
|