use the preffered method of creating an unique index in postgresql as suggested by the manual
Merge pull request #2803 from nineinchnick/788-postgresql-createindex

use the preffered method of creating an unique index in postgresql