Make sure checkout form unique name is actually unique

* Make sure legacy data has a value for the unqiue_name column, handle collisions
* Make sure table column index on unique name fields exits

Addresses issue #1242
Built on top of PR #1238