refactor(mariadb/schema): use sql_ddl() method

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
Akhil Narang 2023-10-31 16:17:00 +05:30
parent ccc2bdad52
commit 8d540963c8
No known key found for this signature in database
GPG key ID: 9DCC61E211BF645F

View file

@ -121,7 +121,7 @@ class MariaDBTable(DBTable):
query_body = ", ".join(query_parts)
query = f"ALTER TABLE `{self.table_name}` {query_body}"
# nosemgrep
frappe.db.sql(query)
frappe.db.sql_ddl(query)
except Exception as e:
if query := locals().get("query"): # this weirdness is to avoid potentially unbounded vars