Added users model for authentication with roles and user roles

This commit is contained in:
Saurab-Shrestha 2024-01-11 17:48:35 +05:45
parent 0a89d76cc5
commit b67b66cd44
53 changed files with 1955 additions and 43 deletions

View file

@ -0,0 +1,13 @@
from private_gpt.users.core.config import SQLALCHEMY_DATABASE_URI
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
engine = create_engine(SQLALCHEMY_DATABASE_URI, echo=True, future=True, pool_pre_ping=True)
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
# test_engine = create_engine(
# f"{settings.SQLALCHEMY_DATABASE_URI}_test", pool_pre_ping=True
# )
# TestingSessionLocal = sessionmaker(
# autocommit=False, autoflush=False, bind=test_engine
# )