small medium large xlarge

06 Sep 2009, 02:30
Andrew Rodriguez (3 posts)
  1. (6.2) When I enter the line to create the database for product (book, p. 68), the file that is created in db/migrate does not start with a time stamp. It is simply, 001_create_products.rb. Why does it differ from the book? (Windows XP/Vista, Instant Rails 2.0).

  2. (6.2) On the next page, to test the creation of the table, I’m instructed to enter the SQL command for sqllite3. I noticed that the table “schema_migrations” didn’t exist. However, the “schema_info” table existed. Any idea why the difference?

  3. (6.3) When I enter the command to add price to product, how does it know to add it to the product table? I know that at this point I only have one table, but later when I have more, will I have to do the command differently?

Thank you in advance, Andrew

14 Oct 2009, 09:11
Truls Unstad (6 posts)

On 3. the format of the command is add_<field>_to_<tablename> so you would have to name the command after the field and table you want to add.

22 Oct 2009, 06:49
Scott Johnson (3 posts)

As for 1 & 2, you’re using an older version of Rails that numbered & kept track of migrations differently.

You must be logged in to comment