Intergrity Error - Duplicate Entry 'Work Order' in key PRIMARY

We have been thrown up with one error after another since we upgraded to the latest 11th Version.

  1. We got SQL error 1064 - for which we tried to implement Mr.Mehta’s suggestion.

https://discuss.frappe.io/t/sept-2018-important-develop-branch-is-now-version-12/41063?u=sivabalan-s

  1. After performing bench pull and patch, now thrown up with duplicate entry error. Kindly help