Skip to content

Commit

Permalink
feat: move the generate table to domain
Browse files Browse the repository at this point in the history
  • Loading branch information
calenzo committed Nov 20, 2022
1 parent da7f4cc commit abada9d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/balance_domain/database/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker

from balance_domain.models import user_models

load_dotenv()

USERNAME = os.environ["DB_USERNAME"]
Expand All @@ -19,6 +21,7 @@
engine = create_engine(SQLALCHEMY_DATABASE_URL)
Base = declarative_base()
Session = sessionmaker(bind=engine)
Base.metadata.create_all(bind=engine) # Generate tables?


class ConnectionDatabase:
Expand Down

0 comments on commit abada9d

Please sign in to comment.