Skip to content
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

fix: strip dev from version when semver comparing for migrations #872

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/keri/db/basing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1347,7 +1347,8 @@ def migrate(self):
"""
for (version, migrations) in MIGRATIONS:
# Check to see if this is for an older version
if self.version is not None and semver.compare(version, self.version) != 1:
if self.version is not None and semver.compare(version.replace('dev', ''),
self.version.replace('dev', '')) != 1:
continue

for migration in migrations:
Expand Down Expand Up @@ -1408,7 +1409,8 @@ def current(self):
return True

# If database version is ahead of library version, throw exception
if self.version is not None and semver.compare(self.version, keri.__version__) == 1:
if self.version is not None and semver.compare(self.version.replace('dev', ''),
keri.__version__.replace('dev', '')) == 1:
raise kering.ConfigurationError(
f"Database version={self.version} is ahead of library version={keri.__version__}")

Expand Down
Loading