I have a data structure:
t.integer :userID
t.string :apikey
t.integer :characterID
The userID should be the primary key (name is not important, it can default to :id
). However, I don't want it to be auto incrementing or anything else, just take the value provided and write it into the database.
How do I have to adjust the migration and the model to achieve what I want?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…