# Migration File

**URL:** <https://www.ruby-forum.com/t/migration-file/152974>\
**Category:** Rails\
**Created:** [November 10, 2008, 7:42pm UTC](https://www.ruby-forum.com/t/migration-file/152974 "2008-11-10T19:42:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bert\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/278dde/32.png) [@bert\_a](https://www.ruby-forum.com/u/bert_a)\
**Post date:** [November 10, 2008, 7:42pm UTC](https://www.ruby-forum.com/t/migration-file/152974/1 "2008-11-10T19:42:11Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![bert\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/278dde/32.png) [@bert\_a](https://www.ruby-forum.com/u/bert_a)\
**Post date:** [November 11, 2008, 2:46am UTC](https://www.ruby-forum.com/t/migration-file/152974/2 "2008-11-11T02:46:19Z")

</div>

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](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![bert\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/278dde/32.png) [@bert\_a](https://www.ruby-forum.com/u/bert_a)\
**Post date:** [November 11, 2008, 3:33am UTC](https://www.ruby-forum.com/t/migration-file/152974/3 "2008-11-11T03:33:42Z")

</div>

On Nov 10, 7:45 pm, Rick [removed\_email\_address@domain.invalid](mailto: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.

---

<div class="post-metadata">

**Author:** ![bert\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/278dde/32.png) [@bert\_a](https://www.ruby-forum.com/u/bert_a)\
**Post date:** [November 11, 2008, 4:18pm UTC](https://www.ruby-forum.com/t/migration-file/152974/4 "2008-11-11T16:18:33Z")

</div>

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](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![bert\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/278dde/32.png) [@bert\_a](https://www.ruby-forum.com/u/bert_a)\
**Post date:** [November 11, 2008, 4:07am UTC](https://www.ruby-forum.com/t/migration-file/152974/5 "2008-11-11T04:07:13Z")

</div>

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](mailto:removed_email_address@domain.invalid)

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