models:table_exists: use pony-given approach

master
Felix Stupp 2 years ago
parent 51a13abb88
commit bbaa79f20a
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -1226,8 +1226,10 @@ CUSTOM_TABLE_DEFINITIONS: Mapping[SafeStr, str] = {
def table_exists(table_name: SafeStr) -> bool: def table_exists(table_name: SafeStr) -> bool:
# TODO may be mariadb specific return db.provider.table_exists(
return db.exists(f"SHOW TABLE STATUS WHERE Name = '{table_name}'") connection=db.get_connection(),
table_name=table_name,
)
def setup_custom_tables(): def setup_custom_tables():

Loading…
Cancel
Save