Migration File


#1

All of the books I have show the migration file naming convention is
001, 002, etc

When I ran script/generate model, the migration file was named:
20081110174511_create_users.rb

Why does it have this complex number instead of 001? Is there a way to
redo this and get the simpler name?


#2

It’s a date/time stamp. I guess it’s guaranteed to be unique - as
long as you ensure that you timeofday clock is in good shape.

Rick

On Nov 10, 8:42 am, Bert A. removed_email_address@domain.invalid


#3

On Nov 10, 7:45 pm, Rick removed_email_address@domain.invalid wrote:

It’s a date/time stamp. I guess it’s guaranteed to be unique - as
long as you ensure that you timeofday clock is in good shape.

Rick

That’s the truth. It is meant to try and help with distributed
development teams having duplicate numbers for migration files.


#4

Nope, nothing wrong, just a change. Glad we can be of some help.

On Nov 10, 9:07 pm, Bert A. removed_email_address@domain.invalid


#5

Rick wrote:

It’s a date/time stamp. I guess it’s guaranteed to be unique - as
long as you ensure that you timeofday clock is in good shape.

Rick

On Nov 10, 8:42�am, Bert A. removed_email_address@domain.invalid

Thank you very much, Rick and Bobnation! I thought I did something
wrong.