i'm trying migrate old php website database (mysql) rails 3 app (mysql) rake legacy script this:
but have problem:
- old table id's lost because if have table
id | field
1 | field_value
2 | field_value 2
4 | field_value 4
using model.create(....) becomes:
id | field
1 | field_value
2 | field_value 2
3 | field_value 4
how can migrate using model.create(....) , mantaining old id's?
have here: overriding id on create in activerecord
also, consider dumping , importing whole database. can make rails specific modifications data later migrations.
Comments
Post a Comment