aboutsummaryrefslogtreecommitdiff
path: root/order-service/app/init_db.py
blob: 7ee146507a3690e8e1186dfc14ae5f21ee915fb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
from app.core.database import engine, Base

from app.models.order import Order, OrderItem


def init_database():
    print("Creating database tables...")
    Base.metadata.create_all(bind=engine)
    print("Database initialized successfully! 🎉")


if __name__ == "__main__":
    init_database()