diff options
| author | alex <[email protected]> | 2026-07-15 20:24:31 +0200 |
|---|---|---|
| committer | alex <[email protected]> | 2026-07-15 20:24:31 +0200 |
| commit | 8e12cb9bb66adc7adaf6d276133d6f235d294d23 (patch) | |
| tree | 31aa3f6a06407b39bb23d7cc724c70899795a788 /order-service/app/init_db.py | |
| download | order-inventory-system-8e12cb9bb66adc7adaf6d276133d6f235d294d23.tar.xz order-inventory-system-8e12cb9bb66adc7adaf6d276133d6f235d294d23.zip | |
init
Diffstat (limited to 'order-service/app/init_db.py')
| -rw-r--r-- | order-service/app/init_db.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/order-service/app/init_db.py b/order-service/app/init_db.py new file mode 100644 index 0000000..7ee1465 --- /dev/null +++ b/order-service/app/init_db.py @@ -0,0 +1,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() |
