didier/database/scripts/db03_machine_learning_cse.py

23 lines
578 B
Python
Raw Permalink Normal View History

2022-09-27 18:34:07 +02:00
from sqlalchemy.ext.asyncio import AsyncSession
from database.engine import DBSession
from database.schemas import UforaCourse
__all__ = ["main"]
async def main():
"""Add a missing Ufora course (Machine Learning - CSE)"""
session: AsyncSession
async with DBSession() as session:
mlcse = UforaCourse(
code="E061330",
name="Machine Learning (CSE)",
2022-09-27 18:41:28 +02:00
year=5,
2022-09-27 18:34:07 +02:00
role_id=1024355572256092170,
overarching_role_id=1023300434800164914,
)
session.add(mlcse)
await session.commit()