Files
syops/backend/app/extensions.py
T

13 lines
389 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""
backend/app/extensions.py
用途:Flask 扩展实例(db、migrate)集中定义;Wave 1 从 __init__.py 迁入并接线。
依赖:flask_sqlalchemy、flask_migrate。
逻辑:create_app 调用 db.init_app(app);models 与各 service 从本模块 import db。
"""
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
db = SQLAlchemy()
migrate = Migrate()