mirror of
https://github.com/Infinidat/infi.clickhouse_orm.git
synced 2024-11-22 00:56:34 +03:00
ignore non-numeric parts of version string
This commit is contained in:
parent
76d432b838
commit
0787efc1cc
|
@ -413,7 +413,7 @@ class Database(object):
|
||||||
except ServerError as e:
|
except ServerError as e:
|
||||||
logger.exception('Cannot determine server version (%s), assuming 1.1.0', e)
|
logger.exception('Cannot determine server version (%s), assuming 1.1.0', e)
|
||||||
ver = '1.1.0'
|
ver = '1.1.0'
|
||||||
return tuple(int(n) for n in ver.split('.')) if as_tuple else ver
|
return tuple(int(n) for n in ver.split('.') if n.isdigit()) if as_tuple else ver
|
||||||
|
|
||||||
def _is_existing_database(self):
|
def _is_existing_database(self):
|
||||||
r = self._send("SELECT count() FROM system.databases WHERE name = '%s'" % self.db_name)
|
r = self._send("SELECT count() FROM system.databases WHERE name = '%s'" % self.db_name)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user