diff options
| author | alex <[email protected]> | 2026-07-17 18:16:35 +0200 |
|---|---|---|
| committer | alex <[email protected]> | 2026-07-17 18:16:35 +0200 |
| commit | 8e796c9cfcd65f6225a6ae3ec2a4419f265b0ebc (patch) | |
| tree | 1bf90385144be2e9f350c31da553b1ac306ee60b /inventory-service/app/init_db.py | |
| parent | 5f6918db393ed78dd8f038e9e5f1ea85f811dc52 (diff) | |
| download | order-inventory-system-main.tar.xz order-inventory-system-main.zip | |
Diffstat (limited to 'inventory-service/app/init_db.py')
| -rw-r--r-- | inventory-service/app/init_db.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/inventory-service/app/init_db.py b/inventory-service/app/init_db.py new file mode 100644 index 0000000..0d6370e --- /dev/null +++ b/inventory-service/app/init_db.py @@ -0,0 +1,13 @@ +from app.core.database import engine, Base + +from app.models.inventory import Product, StockMovement, ProcessedEvent # noqa: F401 + + +def init_database(): + print("Creating inventory database tables...") + Base.metadata.create_all(bind=engine) + print("Inventory database initialized successfully! 🎉") + + +if __name__ == "__main__": + init_database() |
