Rake migrate working but not working


#1

Hi All

I got this migration to work the first time I tried it, dropped the
table and not the migration won’t create the table but does not show any
errors. Here is the trace on the execution of the rake migrate:

my-computer:~/forms lars$ rake migrate --trace
(in /Users/lars/forms)
** Invoke migrate (first_time)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
** Invoke db:schema:dump (first_time)
** Invoke environment
** Execute db:schema:dump
** Execute migrate

I’m at a loss. I’ve checked that the database access configuration was
done properly. Where should I go from here tracking this one down?

Thanks


#2

I forgot to mention that I’m using OS 10.4.6 (Intel) with mysql 5.0.20
and rails 1.1.2.


#3

I solved my problem. I needed to drop the schema_info table from the
database as well, not just the table I wanted to drop. When both tables
are cleared from the database, rake migrate wil create the new tables in
the database.


#4

Hi,

The migrations use the version number stored in a table named
schema_info
to know which migrations to execute. Did you reset this version number
before trying your migration once again ?

A better way to reset your schema would be to use “rake migrate
VERSION=0”.

HTH,
Stéphane.