The error during migration

Hi, all

we got a error when doing ‘bench update --upgrade’. Error description: search fields should contain valid field names.

I checked the data in ‘tabProperty setter’, the problem data is: search fields in sales order, we got ‘customer,customer_name, transaction_date, net_total_export,status, order_type’, but net_total_export seems not existed on version 6, so we got this error.

how to solve this problem? do we need a patch to update this data or we can update this data in ‘tabProperty setter’ using sql directly before doing ‘bench update --upgrade’?

bench --site [site_name] console
frappe.db.sql("delete from `tabProperty Setter` where doc_type = 'Sales Order' and property = 'search_fields'")
frappe.db.commit()

@nabinhait, thank you for your reply.

Still have two questions:
1.can I use “update tabProperty Setter set value=‘customer,customer_name, transaction_date, net_total,status, order_type’ where doc_type = ‘Sales Order’ and property = ‘search_fields’” because we already knew net_total_export is renamed net_total.
2. The solution you told me is not using patch, just input those command lines by manually before doing ‘bench update --upgrade’, right?

@Jasmine Yes, you can use update query as well and this should be run manually from console.

Thank you very much.