fixing catch syntax and removing unique index so that upgrade on openacs.org runs without problems (probably other db's out there have the same issue).
for some reason function apm__register_parameter/10 was missing on openacs.org.