feat: initial commit - oncology literature search platform
OncoLit: a multi-tenant oncology literature search, feed, and collaboration platform. Built with FastAPI + Vue 3 + PostgreSQL. Includes PubMed pipeline, drug approvals, AI summaries, and systematic review tools.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import asyncio
|
||||
from sqlalchemy import text
|
||||
from sqlalchemy.ext.asyncio import create_async_engine
|
||||
DATABASE_URL = 'postgresql+asyncpg://scilit:scilit_prod_2026@postgres:5432/scilit'
|
||||
async def main():
|
||||
engine = create_async_engine(DATABASE_URL)
|
||||
async with engine.connect() as conn:
|
||||
r = await conn.execute(text("SELECT column_name FROM information_schema.columns WHERE table_name = 'tenants' ORDER BY ordinal_position"))
|
||||
cols = [row.column_name for row in r]
|
||||
print('tenants cols:', cols)
|
||||
r = await conn.execute(text("SELECT column_name FROM information_schema.columns WHERE table_name = 'users' ORDER BY ordinal_position"))
|
||||
cols2 = [row.column_name for row in r]
|
||||
print('users cols:', cols2)
|
||||
# Get admin user
|
||||
r = await conn.execute(text("SELECT id, email FROM users WHERE email = 'admin@scilit.cn'"))
|
||||
u = r.first()
|
||||
print(f'admin user id: {u.id}')
|
||||
# List tenants
|
||||
r = await conn.execute(text("SELECT id, name FROM tenants"))
|
||||
for row in r:
|
||||
print(f' tenant: {row.id} {row.name}')
|
||||
await engine.dispose()
|
||||
asyncio.run(main())
|
||||
Reference in New Issue
Block a user