Thank you! Yes, I'm using postgres and a bit new to the tools... I didn't see the migration_info table as I hadn't refreshed them. That all makes sense now. Would make for a great one-liner in the readme though, I think.
On Jan 4, 4:02 am, Chris Corbyn <[email protected]> wrote: > The migration state is stored in a table called migration_info, which only > has one column, containing the name of all migrations that have run (the > number is only used to order to the ones that haven't been run). > > I've only ever used the rake task from dm-rails to run the migrations, so > maybe look at what that does. > > https://github.com/datamapper/dm-rails/blob/master/lib/dm-rails/railt... > > What adapter are you using? dm-migrations only supports SQLite, Postgres and > MySQL, from memory. That said, I don't see where you actually set up > datamapper in your example here. Perhaps that is what you're missing? > > On 04/01/2012, at 7:44 PM, Tom wrote: > > > > > > > > > Hi All, > > > I am having trouble understanding how migrate_up! works, and I suspect > > I'm missing something very simple. I have what may be the simplest > > migration file... I cut it down to the point where all it does is log: > > > -------------------------------------------------------------------- > > require 'dm-migrations/migration_runner' > > > DataMapper::Logger.new(STDOUT, :debug) > > DataMapper.logger.debug( "Starting Migration" ) > > > migration 1, :allow_multiple_tabs do > > up do > > DataMapper.logger.debug( "Migration 1 UP" ) > > end > > > down do > > DataMapper.logger.debug( "Migration 1 DOWN" ) > > end > > end > > > migrate_up! > > DataMapper.logger.debug( "Finished Migration" ) > > -------------------------------------------------------------------- > > > In irb I run this: > > require 'rubygems' > > require 'data_mapper' > > require 'lib/migrations' (the file above) > > > And, all I get is this - no sign that it tried to bring up the > > migration: > > > ~ Starting Migration > > ~ Finished Migration > > => true > > > This is where I'd assume that, like activerecord, the migration > > framework has some belief that the migration already ran and is > > skipping it, but dm-migrations don't seem to store state anywhere I > > can find (or have found documented). > > > Any ideas? > > > Thanks, > > Tom > > > -- > > 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 > > athttp://groups.google.com/group/datamapper?hl=en. -- 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.
