fix(MariaDBTable): dont attempt to drop index twice (#19783)

This commit is contained in:
Sagar Vora 2023-01-27 03:57:11 +00:00 committed by GitHub
parent cbd5e1156d
commit db9b25ec0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -94,7 +94,7 @@ class MariaDBTable(DBTable):
if not frappe.db.get_column_index(self.table_name, col.fieldname, unique=False):
add_index_query.append(f"ADD INDEX `{col.fieldname}_index`(`{col.fieldname}`)")
for col in self.drop_index + self.drop_unique:
for col in {*self.drop_index, *self.drop_unique}:
if col.fieldname == "name":
continue