SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Oct 2008
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Incremental migration file query

    I am following 'Simply Rails 2' by Patrik Lenz..

    I have just created the 'Vote' model and have noticed that my file names differ from that suggested in the book:

    SR2 states that each new migration file should increase in single increments starting from 001, i.e.


    'db/migrate/001_create_stories.rb'
    'db/migrate/002_create_votes.rb'

    HOWEVER the files that I have generated are:

    '20090216191300_create_stories.rb'
    '20090219122707_create_votes.rb'

    Although these file names are in an ascending order, there doesn't seem to be any standard incremental increase between these file names.

    I was wondering if anyone else had encountered this problem and if it is likely to cause me any problems further down the development process?

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,189
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)
    Somewhere there was a Rails change in the numbering from sequential to date/time. i.e.
    YYYYMMDDHHMMSS
    20090216191300 = Feb 16, 2009 7PM 13 min. 00 sec

    Not to worry, the migrations will work fine with this numbering as time increments positively as well.

  3. #3
    SitePoint Member
    Join Date
    Oct 2008
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That makes sense..

    I knew there must be some logic behind it..

    thanks


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
  •