Skip to content

Commit

Permalink
build(deps): bump sqlalchemy from 2.0.18 to 2.0.30 (#29)
Browse files Browse the repository at this point in the history
* build(deps): bump sqlalchemy from 2.0.18 to 2.0.30

Bumps [sqlalchemy](https://github.com/sqlalchemy/sqlalchemy) from 2.0.18 to 2.0.30.
- [Release notes](https://github.com/sqlalchemy/sqlalchemy/releases)
- [Changelog](https://github.com/sqlalchemy/sqlalchemy/blob/main/CHANGES.rst)
- [Commits](https://github.com/sqlalchemy/sqlalchemy/commits)

---
updated-dependencies:
- dependency-name: sqlalchemy
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* fix: adapted select statement for new sqlalchemy version

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Markus Levonyak <[email protected]>
  • Loading branch information
dependabot[bot] and markuslevonyak authored Jun 10, 2024
1 parent d9424af commit 0b63959
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 53 deletions.
9 changes: 5 additions & 4 deletions pantos/servicenode/database/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,17 @@ def initialize_package(is_flask_app: bool = False) -> None:
# Initialize the tables
with _session_maker.begin() as session:
# Blockchain table
max_blockchain_id = \
session.query(sqlalchemy.func.max(Blockchain_.id)).first()[0]
statement = sqlalchemy.select(sqlalchemy.func.max(Blockchain_.id))
max_blockchain_id = session.execute(statement).scalar_one_or_none()
for blockchain in sorted(Blockchain):
if (max_blockchain_id is None
or max_blockchain_id < blockchain.value):
session.add(
Blockchain_(id=blockchain.value, name=blockchain.name))
# Transfer status table
max_transfer_status_id = \
session.query(sqlalchemy.func.max(TransferStatus_.id)).first()[0]
statement = sqlalchemy.select(sqlalchemy.func.max(TransferStatus_.id))
max_transfer_status_id = session.execute(
statement).scalar_one_or_none()
for transfer_status in sorted(TransferStatus):
if (max_transfer_status_id is None
or max_transfer_status_id < transfer_status.value):
Expand Down
105 changes: 57 additions & 48 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Flask-RESTful = "0.3.10"
marshmallow = "3.21.3"
psycopg2-binary = "2.9.9"
PyYAML = "6.0.1"
SQLAlchemy = "2.0.18"
SQLAlchemy = "2.0.30"
web3 = "6.5.0"
JSON-log-formatter = "0.5.2"
pyaml-env = "1.2.1"
Expand Down

0 comments on commit 0b63959

Please sign in to comment.