UNIQUE/PRIMARY KEY constraints are checked now

Exceptions never make it back to the top-level for some reason, but they get logged. After 20min, I couldn't figure this out, so meh whatever.