Spaces:
Sleeping
Sleeping
Download create_tables.py from hsailorj/ymt-python: direct link, hf CLI and curl.
- Browser
- Download file 637 Bytes
-
https://huggingface.co/spaces/hsailorj/ymt-python/resolve/main/create_tables.py
- Command line
-
hf download hf://spaces/hsailorj/ymt-python/create_tables.py
-
curl -L -o create_tables.py https://huggingface.co/spaces/hsailorj/ymt-python/resolve/main/create_tables.py
637 Bytes
| from database import engine, Base | |
| from models.product import Product | |
| from models.company import Company | |
| from models.user import User | |
| from models.category import Category | |
| from models.membership import Membership | |
| from models.operation_log import OperationLog | |
| from models.contact import Contact | |
| from models.template import Template | |
| from models.member_level import MemberLevel | |
| from models.customer_relationship import CustomerRelationship | |
| print("=" * 80) | |
| print("开始创建数据库表...") | |
| print("=" * 80) | |
| # 创建所有表 | |
| Base.metadata.create_all(bind=engine) | |
| print() | |
| print("=" * 80) | |
| print("所有表创建完成!") | |
| print("=" * 80) | |