Noob db:migrate question

I am using RadRails and reading through the Dummies book. I have
created a db (company) and a model (Employee). I edited the
001_create_employees.rb script by copy and paste from the book. When I
use Rake Tasks (db:migrate) -> Go, after a few moments the Console
displays " migrate [internal launch] rake (datetime)", and
no db table is created. I tested the db credentials using the mysql
client on the command line and that appears correct. I don’t know what
else to do at this point. Can anyone give me a hint?

On 5 Feb 2008, at 07:59, rogwei wrote:

I am using RadRails and reading through the Dummies book. I have
created a db (company) and a model (Employee). I edited the
001_create_employees.rb script by copy and paste from the book. When I
use Rake Tasks (db:migrate) -> Go, after a few moments the Console
displays " migrate [internal launch] rake (datetime)", and
no db table is created. I tested the db credentials using the mysql
client on the command line and that appears correct. I don’t know what
else to do at this point. Can anyone give me a hint?

Had you run the migration before? If you run a (for example) empty
migration and then edit it, rails won’t rerun the migration. You need
to migrate down (rake rb:migrate VERSION=XXX) and back up again.
Other than that, maybe something is up with the migration itself?

Fred

The full story…I started using Rails 2.0 but found the book author’s
blog that said you had to downgrade to 1.2.3 for all the samples to
work. Consequently, I uninstalled Rails 2.0 and installed 1.2.3. I
deleted the original company project (from disk, too), dropped the
previously migrated employees table in phpAdmin, and started over.
Where does Rake get its memory of the previous migration?

On Feb 5, 1:22 am, Frederick C. [email protected]

Ok, I used the VERSION=001 option in Rake and it worked. Thanks,
Frederick.