mirror of
https://github.com/stijndcl/didier.git
synced 2026-04-07 23:55:46 +02:00
Add image processing
This commit is contained in:
parent
5bfd3a92a9
commit
17b6ebac89
1 changed files with 22 additions and 0 deletions
22
database/scripts/db06_image_processing.py
Normal file
22
database/scripts/db06_image_processing.py
Normal 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()
|
||||
Loading…
Add table
Add a link
Reference in a new issue