Skip to content

Commit

Permalink
Fix #165 (database version) (#223)
Browse files Browse the repository at this point in the history
* fix getting database version on route /version
  • Loading branch information
David Caron committed Oct 11, 2019
2 parents bc57cca + fbeeddd commit 82fe19c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ History
Unreleased
---------------------

Bug Fixes
~~~~~~~~~~~~~~~~~~~~~
* fix the alembic database version number in the /version route

1.6.2 (2019-10-04)
---------------------

Expand Down
2 changes: 1 addition & 1 deletion magpie/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def run_database_migration(db_session=None):

def get_database_revision(db_session):
# type: (Session) -> Str
s = select(["version_num"], from_obj="alembic_version")
s = "SELECT version_num FROM alembic_version"
result = db_session.execute(s).fetchone()
return result["version_num"]

Expand Down

0 comments on commit 82fe19c

Please sign in to comment.