diff options
author | Wolfgang Müller | 2023-03-30 21:26:07 +0200 |
---|---|---|
committer | Wolfgang Müller | 2023-03-30 21:28:34 +0200 |
commit | 663167359693331941a0a510a17a88c70185a310 (patch) | |
tree | 77e5959468259fea197565a9dcb39142a89cee97 /quarg/database/tables.py | |
parent | 73819ce2aad0b66b4858d207ab1f865ee8f22e5c (diff) | |
download | quarg-663167359693331941a0a510a17a88c70185a310.tar.gz |
Migrate to SQLAlchemy 2.0
This needs very few changes:
- Use declarative_base from sqlalchemy.orm instead of ext [1]
- Enable the future flag on both engine and session
[1] https://docs.sqlalchemy.org/en/20/errors.html#error-b8d9
Diffstat (limited to 'quarg/database/tables.py')
-rw-r--r-- | quarg/database/tables.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/quarg/database/tables.py b/quarg/database/tables.py index 0b14eca..c71cedd 100644 --- a/quarg/database/tables.py +++ b/quarg/database/tables.py @@ -1,7 +1,6 @@ import datetime -from sqlalchemy.ext.declarative import declarative_base -from sqlalchemy.orm import relationship +from sqlalchemy.orm import declarative_base, relationship from sqlalchemy.schema import Column, ForeignKey from sqlalchemy.types import ( BigInteger, |