Skip to content

Migration to SQLAlchemy 2.0 #1010

@tgross35

Description

@tgross35

SQLAlchemy is moving toward a new system, detailed here: https://docs.sqlalchemy.org/en/14/changelog/migration_20.html. Flask-SQLAlchemy should also move in that direction.

The main difference is that session.query(Model) is being replaced, essentially with, session.execute(select(Model)). The old Session.query() will still be around, but is moved to legacy essentially dropped from maintenance / feature improvement.

My suggestion is to add a Model.select() method that adheres to this new format. This should be pretty straightforward and possibly already in the works (I didn't see anything though).

There are likely other ways that FSA could start moving to SQLA 2.0, but the select method is probably a top priority.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions