-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prepare to migrate to sqlalchemy 2.0 #310
Comments
sde1000
added a commit
that referenced
this issue
Jan 19, 2025
(Web interface not yet addressed.) Remainder of td.s.query(model).get(pk) calls converted to td.s.get(model, pk) Related object loader paths are no longer passed as strings (joinedload(), undefer(), etc.) select([things...], whereclause) converted to select(things...).where(cond) See #310 on github.
sde1000
added a commit
that referenced
this issue
Jan 21, 2025
Mostly the web interface. See #310 on github.
sde1000
added a commit
that referenced
this issue
Jan 24, 2025
Updates for sqlalchemy-2.0: MetaData.bind is no longer supported Instead the engine is passed either explicitly when calling create_all() etc. or implicitly as bound to the session. See #310 on github.
sde1000
added a commit
that referenced
this issue
Jan 24, 2025
The "slice index" feature of Query no longer accepts negative indices in sqlalchemy-2.0. See #310 on github.
sde1000
added a commit
that referenced
this issue
Jan 24, 2025
Hopefully these are the last remaining query(model).get(key) calls, and all have now been converted to session.get(model, key) See #310 on github.
sde1000
added a commit
that referenced
this issue
Jan 24, 2025
Hopefully the last remaining ones! See #310 on github.
sde1000
added a commit
that referenced
this issue
Jan 24, 2025
Removed in sqlalchemy-2.0 - use .join(x).join(y)... instead See #310 on github.
sde1000
added a commit
that referenced
this issue
Jan 25, 2025
Generally: td.s.query(model).get(pk) -> td.s.get(model, pk) .join(a, b, c) -> .join(a).join(b).join(c) Don't pass strings to .joinedload(), .undefer(), etc. select([a, b], whereclause=cond) converted to select(a, b).where(cond) See #310 — sqlalchemy-2.0 migration
sde1000
added a commit
that referenced
this issue
Jan 25, 2025
The "slice index" feature of Query no longer accepts negative indices in sqlalchemy-2.0. See #310 on github.
sde1000
added a commit
that referenced
this issue
Jan 25, 2025
Updates for sqlalchemy-2.0: MetaData.bind is no longer supported Instead the engine is passed either explicitly when calling create_all() etc. or implicitly as bound to the session. See #310 on github.
I believe this is now complete — the till should run correctly with sqlalchemy-1.4 with future=True set on the ORM session, and with sqlalchemy-2.0; the web interface should run with sqlalchemy-1.4 with future=False or future=True, or with sqlalchemy-2.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
All the systems quicktill is installed on now have sqlalchemy 1.4, so it should be possible to start down the 1.x to 2.0 migration path.
See https://docs.sqlalchemy.org/en/20/changelog/migration_20.html
Deprecation warnings from the current (v23.14) state of quicktill:
The text was updated successfully, but these errors were encountered: