ENVIRONMENT
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin10.8.0]; Rails 3.2.6; OSX 10.6.8
PROBLEM
- Even after resetting our database (rake db:reset), migrations are generating erroneous tables, fields, and schemas, featuring tables, fields, limits, indexes and so forth which have been deprecated by earlier migration specifications.
BACKGROUND
I have moved a github-collaborated project back and forth between two OSX 10.6.8 systems. At a previous juncture, migrations were re-begun from scratch by consolidating intended table definitions in a single initial migration (eliminating the substantial confusion and laborious processing of many previous migration specifications).
For months, the revised migrations have faithfully generated tables and schemas.
After pulling our project to my principal development system after synching the public repository from a portable system, further migrations are retaining many tables and fields which in fact are not defined in any of the existing migrations, and which are neither generated by the same migrations in the development environments of other collaborators. In other words, many defunct/deprecated fields and tables are somehow persisting from specifications which were long before removed from our revised migrations. Thus db:migrate produces erroneous tables and schemas on this one system, even after running rake db:reset.
Presumably then, prior prescriptions are retained somewhere in the development environment, and it is necessary somehow either to remove, to revise, or to override prior, no-longer-existing definitions which nonetheless are precipitating in undesirable tables and fields.
In rectifying this problem, it would be very undesirable to be forced to rescind existing work.
QUESTION
What is the proper and effective way then to regenerate migrations, tables, and schemas which are faithful to the migration specifications we have retained in our project?