ActiveRecord HasAndBelongsToManyAssociationWithPrimaryKeyError

Im trying to upgrade an app from rails 2.3 to rails 3.0

I get the following error in rails 3.0.6 environment

Error message:
    Primary key is not allowed in a has_and_belongs_to_many join table

Exception class:

seems primary key should be removed from "appointment_label" so I
removed the primary key column and it did worked PERFECT!!

But what I don't get is the app worked fine in rails 2.3 environment
even with primary key in the table "appointment_label" but not in rails
3.0.6 environment ???

Presumably it did not matter that the table had a primary key in the
earlier version (even though it was not necessary). In Rails 3 they
have made it an error.