Bench Update mysql error in patch

Hello guys,
Getting error in patch while update bench v.8.x to 10.x

Executing erpnext.patches.v8_7.make_subscription_from_recurring_data

pymysql.err.ProgrammingError: (1064, u"You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘)’ at line 1")

any solution??

Getting same error while bench migrate
error in : erpnext.patches.v8_7.make_subscription_from_recurring_data
error : pymysql.err.ProgrammingError: (1064, u"You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘)’ at line 1")

If you have a backup of your data (you should have one…), then you could also try

bench update --reset

bench update --reset
bench update
bench migrate
.
.
all showing same error…