add idempotent migration test
Revert "Revert "persistent-postgresql: Produce correct alter table statements for non-primary foreign references""

This reverts commit 858c5032a9c1707a2566f99ace50d46737914f42.
don't add foreigns to uniques, issue #196