rake db:migrate - where is my table?

Not sure if this is another rails 2.0 issue and the info in AWDWR 2nd ed, or not...

(I'm new to Rails) I modified the 001_create_products.rb file and added the needed info to create 3 tables in a database that I created using CocoaMySQL. When I ran "rake db:migrate" the info on the console looked good. I then go into CocoaMySQL, select that same database, but there are no tables in it. Any ideas? I also use mysql on the command line to look at that database, but no table to be found. What up with that?

Thanks.

What's the result of:

rake db:migrate VERSION=0 --trace

-Thufir

Pardon, I don't follow your point. Yes, I'm all for thread continuity :slight_smile:

-Thufir

Not sure if this is another rails 2.0 issue and the info in AWDWR 2nd ed, or not...

(I'm new to Rails) I modified the 001_create_products.rb file and added the needed info to create 3 tables in a database that I created using CocoaMySQL.

Had you already migrated using this migration before you modified it? This is the picture I get from saying you modified it rather than creating it.

> When I ran "rake db:migrate" the info on the console

looked good. I then go into CocoaMySQL, select that same database, but there are no tables in it. Any ideas? I also use mysql on the command line to look at that database, but no table to be found. What up with that?

If you really did modify it, then rake db:migrate probably didn't do anything other than get the current schema version from the database, notice that it was already 1, and quit.

In general you want to generate a new migration each time you make a schema change to the database.