Reputation: 266978
I want to create a table without a primar key:
users_models
user_id model_id
I have a users table, but the model_id value is actually going to come from a enumeration that I have in my code.
So I don't need a primary key on this table, can I in my migration tell it so it doesn't create one?
Upvotes: 1
Views: 223
Reputation: 48626
At your migration change :
create_table :users, {:id => false, :force => true}
Upvotes: 2