abhirajadhikary06 / abhirajadhikary06/openfeedback
[Bug] Refactor ```auth.py ``` to use SQLAlchemy ORM and fix Circular Imports.
- 主要语言
- HTML
- 星标
- 8
- 派生
- 15
- PR 合并指标
- 30 天内没有已合并 PR
描述
Currently, the application mixes two different methods of database access:
```app.py``` uses **Flask-SQLAlchemy.**
```auth.py``` uses raw sqlite3 connections.
Problems this causes:
Database Locking: Mixing raw connections with ORM sessions on SQLite can lead to "database is locked" errors and potential corruption.
Maintenance: We are defining the User schema in multiple places (SQL definitions in auth.py vs Model definitions in app.py).
Security: Raw SQL queries are more prone to errors than ORM queries.
@abhirajadhikary06
well I already have solution for this problem , would love to initiate.
贡献指南
调研方向
The issue points to auth.py and app.py. Start by examining the current raw SQLite3 connections in auth.py and the Flask-SQLAlchemy setup in app.py. Understand the User model definition in app.py and refactor auth.py to use the same SQLAlchemy ORM session. Ensure you resolve any circular import issues between these modules. Test the authentication flow after changes to confirm no database locking errors occur.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- flask, python, sqlalchemy
- 领域
- backend, database
- Issue 类型
- 重构
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 40/100