>
> And now I have just broke the AddAnotherFieldToFoo migration. This
> affects new developers (who will start doing a checkout and a full
> migration to get a up-to-date database), existing developers who
> hasn't updated they working copy between the two events, and
> deployments intro production (as long as they include two incompatible
> events as shown on my example).
>
They shouldn't be using the migrations. They should be using rake
db:schema:load
> AFAICS, this is a problem of "keeping in sync" the state of models and
> migrations over the time. How do you solve this? Or am I using
> migrations in a way they were not intended to be used?
>
If you are using models in migrations purely because it beats writing
the sql to insert/change/whatever then it's often wise to redeclare
the model in the migration (just stick class Foo < ActiveRecord::Base;
end somewhere convenient) so that all you get is the activerecord
niceness
Fred