diff --git a/README.md b/README.md
index 2c9210dc..fbfb0531 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@
Build ML pipelines with only Python, run on your laptop, or in the cloud.
-
+
[](https://app.circleci.com/pipelines/github/sematic-ai/sematic?branch=main&filter=all)

[](https://python.org)
diff --git a/README.rst b/README.rst
index 47ef8681..a964dfde 100644
--- a/README.rst
+++ b/README.rst
@@ -6,8 +6,8 @@
-.. image:: https://img.shields.io/pypi/v/sematic/0.38.1?style=for-the-badge
- :target: https://img.shields.io/pypi/v/sematic/0.38.1?style=for-the-badge
+.. image:: https://img.shields.io/pypi/v/sematic/0.39.1?style=for-the-badge
+ :target: https://img.shields.io/pypi/v/sematic/0.39.1?style=for-the-badge
:alt: PyPI
diff --git a/docs/changelog.md b/docs/changelog.md
index d3e3dbc7..65595da5 100644
--- a/docs/changelog.md
+++ b/docs/changelog.md
@@ -5,6 +5,8 @@ Lines for version numbers should always be formatted as
with nothing else on the line.
-->
* HEAD
+* [0.39.1](https://pypi.org/project/sematic/0.39.1/)
+ * [bugfix] Fix DB migrations from clean installs after SQLAlchemy upgrade
* [0.39.0](https://pypi.org/project/sematic/0.39.0/)
* [improvement] BREAKING CHANGE: Upgrade SQLAlchemy to a >=2.0.0 version
* [improvement] Add support for python 3.11 and 3.12
diff --git a/helm/sematic-server/Chart.yaml b/helm/sematic-server/Chart.yaml
index d00875a7..50a68fa1 100644
--- a/helm/sematic-server/Chart.yaml
+++ b/helm/sematic-server/Chart.yaml
@@ -2,8 +2,8 @@ apiVersion: v2
name: sematic-server
description: Sematic AI Server
type: application
-version: 1.1.22
-appVersion: v0.39.0
+version: 1.1.23
+appVersion: v0.39.1
maintainers:
- name: sematic-ai
url: https://github.com/sematic-ai/sematic/
diff --git a/sematic/db/migrate.py b/sematic/db/migrate.py
index 40067ec1..a7aecdb5 100644
--- a/sematic/db/migrate.py
+++ b/sematic/db/migrate.py
@@ -51,7 +51,7 @@ def _is_migration_file(file_name: str) -> bool:
def _get_current_versions() -> List[str]:
- with db().get_engine().connect() as conn:
+ with db().get_engine().begin() as conn:
conn.execute(
text(
"CREATE TABLE IF NOT EXISTS "
diff --git a/sematic/db/migrations/20220930014400_migrate_exception_data.py b/sematic/db/migrations/20220930014400_migrate_exception_data.py
index fddb4b2c..8f93efaf 100644
--- a/sematic/db/migrations/20220930014400_migrate_exception_data.py
+++ b/sematic/db/migrations/20220930014400_migrate_exception_data.py
@@ -30,7 +30,7 @@ def up():
def down():
- with db().get_engine().connect() as conn:
+ with db().get_engine().begin() as conn:
# TODO #303: standardize NULL vs 'null'
run_id_exception_json_pairs = conn.execute(
text(
diff --git a/sematic/db/tests/test_migrate.py b/sematic/db/tests/test_migrate.py
index 793bf998..b7ccf1c3 100644
--- a/sematic/db/tests/test_migrate.py
+++ b/sematic/db/tests/test_migrate.py
@@ -83,7 +83,7 @@ def test_invalid_sql(_, test_db_empty): # noqa: F811
def test_migrate(_, test_db_empty): # noqa: F811
with pytest.raises(OperationalError):
- with db().get_engine().connect() as conn:
+ with db().get_engine().begin() as conn:
conn.execute(text("SELECT version FROM schema_migrations;"))
migrate_up()
@@ -93,7 +93,7 @@ def test_migrate(_, test_db_empty): # noqa: F811
assert len(current_versions) > 0
# Test tables were created
- with db().get_engine().connect() as conn:
+ with db().get_engine().begin() as conn:
run_count = conn.execute(text("SELECT COUNT(*) from runs;"))
assert list(run_count)[0][0] == 0
diff --git a/sematic/versions.py b/sematic/versions.py
index f20075cf..a67fcacd 100644
--- a/sematic/versions.py
+++ b/sematic/versions.py
@@ -9,7 +9,7 @@
# the sdk. Should be bumped any time a release is made. Should be set
# to whatever is the version after the most recent one in changelog.md,
# as well as the version for the sematic wheel in wheel_constants.bzl
-CURRENT_VERSION = (0, 39, 0)
+CURRENT_VERSION = (0, 39, 1)
# TO DEPRECATE
# 0.X.X:
diff --git a/sematic/wheel_constants.bzl b/sematic/wheel_constants.bzl
index 7a7fe7d8..e8f38541 100644
--- a/sematic/wheel_constants.bzl
+++ b/sematic/wheel_constants.bzl
@@ -2,7 +2,7 @@
# changelog.md.
# This is the version that will be attached to the
# wheel that bazel builds for sematic.
-wheel_version_string = "0.39.0"
+wheel_version_string = "0.39.1"
wheel_author = "Sematic AI, Inc."
wheel_author_email = "support@sematic.dev"