Fix prepare with

The still undocumented PREPARE-WITH clause that can be attached to constraints had an implementation bug and required a more resilient `migrate` command