We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a5ba603 commit 5b4e586Copy full SHA for 5b4e586
backend/app/main.py
@@ -34,3 +34,15 @@
34
# at the bottom: include users router
35
from app.routers import users
36
app.include_router(users.router, prefix="/users", tags=["Users"])
37
+# --- TEMPORARY: Create Database Tables on Render ---
38
+from app.models.user import User
39
+from app.database import Base, engine
40
+
41
+@app.get("/create-db")
42
+def create_database():
43
+ try:
44
+ Base.metadata.create_all(bind=engine)
45
+ return {"ok": True, "message": "Database tables created successfully"}
46
+ except Exception as e:
47
+ return {"ok": False, "error": str(e)}
48
0 commit comments