Skip to content

Commit

Permalink
fix: commit before ddl
Browse files Browse the repository at this point in the history
  • Loading branch information
ankush committed Mar 11, 2024
1 parent d6bff86 commit 092bd0e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frappe/database/mariadb/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ def updatedb(self, doctype, meta=None):
db_table.validate()

db_table.sync()
self.begin()
self.commit()

def get_database_list(self):
return self.sql("SHOW DATABASES", pluck=True)
Expand Down
2 changes: 1 addition & 1 deletion frappe/database/mariadb/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def alter(self):
if query_parts:
query_body = ", ".join(query_parts)
query = f"ALTER TABLE `{self.table_name}` {query_body}"
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
Expand Down

0 comments on commit 092bd0e

Please sign in to comment.