aboutsummaryrefslogtreecommitdiff
path: root/order-service/app/init_db.py
blob: 88a3149c75aa8267a19e86413981d5b8bc6e6271 (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  # noqa: F401


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


if __name__ == "__main__":
    init_database()