Initial commit: SIBU 2.0 MISSION

This commit is contained in:
2026-02-21 09:53:31 -05:00
commit 0c7aa53c8b
400 changed files with 67708 additions and 0 deletions

20
backend/test_db_fix.py Normal file
View File

@ -0,0 +1,20 @@
from sqlmodel import Session, create_engine, text
from app.core.config import settings
def test_conn():
url = settings.database_url.replace("+asyncpg", "+psycopg2")
# Try adding .supabase.co if it's missing the dot
if "ggo08co8sokggcc040o800c4" in url and "supabase.co" not in url:
url = url.replace("ggo08co8sokggcc040o800c4", "db.ggo08co8sokggcc040o800c4.supabase.co")
print(f"Testing URL: {url}")
try:
engine = create_engine(url)
with Session(engine) as session:
session.exec(text("SELECT 1"))
print("Connection successful!")
except Exception as e:
print(f"Connection failed: {e}")
if __name__ == "__main__":
test_conn()