Fixed compatibility with SQLAlchemy >= 2.0 #250

Merged
blacklight merged 9 commits from 239-sqlalchemy-2-compatibility into master 2023-04-25 10:47:28 +02:00
Owner

Closes: #239

Closes: #239
Import `declarative_base` in a way that is compatible with any
SQLAlchemy version between 1.3 and 2.x.
SQLAlchemy should automatically begin a transaction on
connection/session creation. Plus, `.begin()` messes up things with
SQLAlchemy 2, which has `autobegin` enabled with no easy way of
disabling it.
This removes the need for raw SQL statements and CREATE TABLE statements
that may be engine-specific.
SQLAlchemy 2 no longer supports raw strings passed to `.execute()`
methods.
blacklight changed title from WIP: Fixed compatibility with SQLAlchemy >= 2.0 to Fixed compatibility with SQLAlchemy >= 2.0 2023-04-25 10:47:00 +02:00
Sign in to join this conversation.
No description provided.