Migration not working

I’m working my way though Agile web development 2nd ed.

I got to the part where you add test data into the database, or
the 003_add_test_data file.

When I ran the rake db:migrate, it seemed to work, but the database
did not populate, as it didn’t show up when I called admin/list from my
browser. I went into the mysql server and checked the database with the
“select * from products;” command, but it said it was an empty set. So
I’m guessing the migration doesn’t work, but I copied it from

http://media.pragprog.com/titles/rails2/depot_c/db/migrate/003_add_test_data.rb

and I’m assuming that’s correct. I’ve tried running the rake commands
again but it still doesn’t show up. Any suggestions?

Hi Daniel,

First, the link you provided does not work. Could you paste the code
here or using http://pastie.caboo.se/ ?

Anyhow, you can check the current version of your db, with the following
sql command: “select * from schema_info;”.

Jean-Etienne

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs