SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    May 2009
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Generating a model

    On page 122 (Simply Rails 2), when I run: script/generate model Story name:string link:string, it creates all of the necessarry files, but, instead of it creating: db/migrate/001_create_stories.rb, it creates: db/migrate/20090522522_create_stories.rb

    As you can see, it is using the date instead of "001". is this just standard in the latest rails, or is there something wrong?


    Thanks.

  2. #2
    SitePoint Evangelist
    Join Date
    Feb 2006
    Location
    Worcs. UK
    Posts
    404
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No that's normal. The migration name changed to using the date and time a little while back. The change happened after the book was released. If you use an earlier version of Rails, you'd get the older 001 format. The newer form works just the same, and you can even use them along side migrations that have the old format.

  3. #3
    SitePoint Member
    Join Date
    May 2009
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks man


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •