fix: resolve IST/UTC timezone scheduling delta and enable syllabus tracker hot-reload on JEE+NEET switch

This commit is contained in:
2026-10-23 21:22:49 +05:30
parent 4ae7c8fb65
commit 9cb3e550d4
12 changed files with 198 additions and 101 deletions

View File

@@ -4,8 +4,9 @@ from typing import Generator
DATABASE_URL = os.getenv("DATABASE_URL", "postgresql://pragativeer_admin:local_secure_password_2026@postgres:5432/pragativeer_prod")
# Using the standard SQLModel engine config for PostgreSQL
engine = create_engine(DATABASE_URL, echo=True)
connect_args = {"options": "-c timezone=Asia/Kolkata"} if "postgresql" in DATABASE_URL else {}
# Using the standard SQLModel engine config for PostgreSQL with IST timezone session
engine = create_engine(DATABASE_URL, echo=True, connect_args=connect_args)
def init_db():
# Automatically generates tables based on the classes imported from models.py