mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
AdistTS: Fix update with table exists tests.
This commit is contained in:
1 parent
e79ae8ebf5
commit
229b3da2d1
11 files changed
+50
-78
No files matched your search
@@ -301,6 +301,15 @@ class SQLSubModel(PamhyrID):
|
||||
"""
|
||||
raise NotImplementedMethodeError(cls, cls._db_update)
|
||||
|
||||
@classmethod
|
||||
def is_table_exists(cls, execute, table):
|
||||
return any(
|
||||
execute(
|
||||
"SELECT name FROM sqlite_master " +
|
||||
f"WHERE type='table' AND name='{table}'"
|
||||
)
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def _db_update_to_0_2_0_set_node_pid(cls, execute, table, nodes):
|
||||
els = execute(
|
||||
|
||||
Reference in new issue
Block a user