Neil,

> I had got as far as installing the rc3 gems but was still getting a
> missing method for auto_upgrade! (see below). The thing I was missing
> was the "require dm-migrations" line in the code.
>
> Thanks for the help - I think I need to go back to ruby 101 to
> understand "require" better but even so I'm having great fun with ruby
> :)

Oh, the fact that you missed the require 'dm-migrations' part isn't
your fault. It was a change in the DM 1.0 from 0.10.x. We moved all
the migration related code from dm-core into dm-migrations for a few
reasons:

  - Only 5 of ~40 adapters use the code
  - It's very adapter specific, and not at all "generic" in the way
the other code in dm-core is
  - We can DRY up dm-migrations and have auto-migrations use the same
code path as classic migrations
  - Everyone uses auto-migrations so it gets better maintained than
classic migrations. By unifying things I hope we can raise up the
level of quality for all migrations.
  - It allows us the ability in the future to have it so auto-
migrations and auto-upgrading can output "classic" migrations rather
than just applying the changes immediately, removing more of the need
to write migrations in the first place.

There are other reasons, but these are the main ones. The last one is
particularly important. No one likes to write migrations, and while
auto-migration and auto-upgrading are nice locally, they can't handle
all the cases you need when deploying. However, they do get you
halfway to your goal.. if we can use auto-upgrading to diff the DB vs
the model state and output a classic migration to bring the DB up to
date, then no one will have to write classic migrations anymore. The
task will more be to tweak/edit the class migration that is generated.

--

Dan

-- 
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en.

Reply via email to