Creating a table with migrations when using has_and_belongs_to_many
create_table :table_name, :id => false do |t| end
:id is the part you're looking for, it defaults to true, which creates the :id as an autoincrementing primary key, if you use migrations and want to create the join table, you don't want an "id" column, so use :id => false to override the create_table method and tell it you don't want that primary key.