Replace Flask-SQLAlchemy helpers (db.relationship, db.ForeignKey, etc.) with plain SQLAlchemy equivalents

This commit is contained in:
2026-04-06 01:16:10 +08:00
parent 970c2e9946
commit e6d25882fc
3 changed files with 62 additions and 64 deletions
+1 -2
View File
@@ -28,7 +28,6 @@ from flask.testing import FlaskCliRunner
from flask_babel_js import BabelJS
from flask_sqlalchemy import SQLAlchemy
from flask_wtf import CSRFProtect
from sqlalchemy import Column
bp: Blueprint = Blueprint("home", __name__)
"""The global blueprint."""
@@ -105,7 +104,7 @@ def create_app(is_testing: bool = False, is_skip_accounts: bool = False,
return auth.User
@property
def pk_column(self) -> Column:
def pk_column(self) -> sa.Column:
return auth.User.id
@property