changed simple unique constraint on complex one