auth email/password
This commit is contained in:
18
app/database.py
Normal file
18
app/database.py
Normal file
@@ -0,0 +1,18 @@
|
||||
"""Database configuration and initialization."""
|
||||
|
||||
from flask_sqlalchemy import SQLAlchemy
|
||||
from flask_migrate import Migrate
|
||||
|
||||
db = SQLAlchemy()
|
||||
migrate = Migrate()
|
||||
|
||||
|
||||
def init_db(app):
|
||||
"""Initialize database with Flask app."""
|
||||
db.init_app(app)
|
||||
migrate.init_app(app, db)
|
||||
|
||||
# Import models here to ensure they are registered with SQLAlchemy
|
||||
from app.models import user, user_oauth # noqa: F401
|
||||
|
||||
return db
|
||||
Reference in New Issue
Block a user