Commit f1ffe2a7897d6994fda0b0269713303a3e9414cc
1 parent
1ad906ed
Exists in
dev
update models to new sqlalchemy 2.0 style
Showing
1 changed file
with
2 additions
and
3 deletions
Show diff stats
aprendizations/models.py
1 | 1 | |
2 | -# FIXME Mapped[...] probably wrong for the relationships. | |
2 | +# FIXME Mapped[...] annotations probably wrong for the relationships. | |
3 | 3 | # See sqlalchemy documentation: |
4 | 4 | # https://docs.sqlalchemy.org/en/20/changelog/whatsnew_20.html |
5 | 5 | |
6 | 6 | from typing import List |
7 | 7 | |
8 | 8 | # third party libraries |
9 | -from sqlalchemy import ForeignKey, Integer, Float, String | |
10 | -# from sqlalchemy.orm import declarative_base, relationship | |
9 | +from sqlalchemy import ForeignKey, String | |
11 | 10 | from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column, relationship |
12 | 11 | |
13 | 12 | ... | ... |