Spaces:
Sleeping
Sleeping
Download init_db.py from Tahasaif3/AI-TaskFlow-Backend: direct link, hf CLI and curl.
- Browser
- Download file 440 Bytes
-
https://huggingface.co/spaces/Tahasaif3/AI-TaskFlow-Backend/resolve/main/init_db.py
- Command line
-
hf download hf://spaces/Tahasaif3/AI-TaskFlow-Backend/init_db.py
-
curl -L -o init_db.py https://huggingface.co/spaces/Tahasaif3/AI-TaskFlow-Backend/resolve/main/init_db.py
440 Bytes
| import sys | |
| import os | |
| sys.path.append(os.path.dirname(os.path.abspath(__file__))) | |
| from src.database import engine | |
| from src.models.user import User | |
| from src.models.task import Task | |
| from src.models.project import Project | |
| from src.models.conversation import Conversation | |
| from src.models.message import Message | |
| from sqlmodel import SQLModel | |
| # Create all tables | |
| SQLModel.metadata.create_all(engine) | |
| print('Database tables created successfully') |