Added code to fix up the billing data before we add the unique constraint
Optimize migration by using raw SQL