Add image processing

pull/180/head
Stijn De Clercq 2023-09-24 22:05:34 +02:00
parent 5bfd3a92a9
commit 17b6ebac89
1 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,22 @@
from sqlalchemy.ext.asyncio import AsyncSession
from database.engine import DBSession
from database.schemas import UforaCourse, UforaCourseAlias
__all__ = ["main"]
async def main():
"""Add the Image Processing course"""
session: AsyncSession
async with DBSession() as session:
image_proc = UforaCourse(
code="E010310", name="Image Processing", year=6, compulsory=False, role_id=1155595071228498134
)
session.add(image_proc)
await session.commit()
image_proc_alias = UforaCourseAlias(course_id=image_proc.course_id, alias="Beeldverwerking")
session.add(image_proc_alias)
await session.commit()