File size: 474 Bytes
20cccb6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
"""
init_db.py

This script initializes the database by creating all tables defined in the ORM models.
Run this script once to create your tables in the PostgreSQL database.
"""

# Local Application Imports
from src.config import logger
from src.database.database import engine
from src.database.models import Base


def init_db():
    Base.metadata.create_all(bind=engine)
    logger.info("Database tables created successfully.")


if __name__ == "__main__":
    init_db()