Is it possible to change a field that's a string to an integer without clearing the data already entered?
The current db structure for the table in question is:
create_table :people do |t|
t.string :company_id
Is this possible using migrations?
I'm thinking maybe in the migration drop the old field, create a new one that's an integer - but I'm worried this will clear all of the data already entered.
Thanks,
Danny
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…