- 新增 orm.py:按 db_type 构建引擎(postgresql+psycopg2 / mssql+pyodbc), 声明式 Attachment 模型,init_schema 幂等建表 - 重写 db.py 为 SQLAlchemy Core 实现(动态 Table + quote 跨库正确引用、 id/sn 双键回查、跨库分页、先删后插幂等),对外签名不变 - 配置:config.yaml 默认 PostgreSQL,新增 config.mssql.yaml 保留 SQL Server, config_loader 支持可选 driver 与 db_type - write_attachments.py 新增 --init-db - 依赖 requirements.txt 增 sqlalchemy / psycopg2-binary(保留 pyodbc) - README 对齐:修正目标表字段描述并新增数据库抽象层小节
44 lines
521 B
Plaintext
44 lines
521 B
Plaintext
# Python
|
|
__pycache__/
|
|
*.py[cod]
|
|
*$py.class
|
|
*.egg-info/
|
|
*.egg
|
|
.eggs/
|
|
build/
|
|
dist/
|
|
|
|
# Virtual environments
|
|
venv/
|
|
.venv/
|
|
env/
|
|
ENV/
|
|
|
|
# Logs & runtime output
|
|
logs/
|
|
*.log
|
|
|
|
# Environment / secrets
|
|
.env
|
|
.env.local
|
|
.env.*.local
|
|
config.yaml
|
|
config.*.yaml
|
|
config.local.yaml
|
|
|
|
# Test & type caches
|
|
.pytest_cache/
|
|
.mypy_cache/
|
|
.ruff_cache/
|
|
.coverage
|
|
htmlcov/
|
|
|
|
# Editor / OS (kept in case this folder is used standalone)
|
|
.idea/
|
|
.vscode/
|
|
*.swp
|
|
.DS_Store
|
|
|
|
# Project-local agent data (uncomment if you do NOT want to track it)
|
|
.workbuddy/
|