I have a join table I’m creating with a migration as follows:
create_table :read_global_messages, :id=>false do |t| t.column :user_id, :integer t.column :message_id, :integer end
So far so good, however I want the primary key to be user_id and
message_id. How do I do this?
I tried the following, but that doesn’t work:
add_index :read_global_messages, [:user_id, :message_id], :primary
I could just add it as a normal index, but ideally I’d like it to be a
primary key otherwise this table will be without one (as there’s no ID
Thanks in advance.