Migrate SQLAlchemy ORM usage to v2 syntax
Background
SQLAlchemy has changed they way ORM should be used, and we should follow the 2.0 style.
Implementation
See https://docs.sqlalchemy.org/en/20/changelog/migration_20.html#migration-orm-usage
SQLAlchemy has changed they way ORM should be used, and we should follow the 2.0 style.
See https://docs.sqlalchemy.org/en/20/changelog/migration_20.html#migration-orm-usage