views:

72

answers:

2

hello, i have this crazy label for each time i create a migration that use the time instead of a integer. it makes things very hard to switch between the version of the database that you want to use. i also have this crazy ID for each object that i create :

How can set up rails to have easy version and id numbers.

thank you

+2  A: 

The number is timestamp. Really useful when you have several collaboration in same project.

If you want the old system us that in your environement.rb file

   config.active_record.timestamped_migrations = false
shingara
what about the the big id number when a model is created?
fenec
The big Id number is the timestamp where migration is made. It's made to avoid conflict if 2 developers made a new migration in same commit. This problem is arrived with DSCM solution.
shingara
+1  A: 

Why would you need to switch between "versions of the database"? If you mean redoing and undoing a migration, you can do it like this:

rake db:rollback

Which undoes the last migration, then

rake db:migrate

To redo it again. You shouldn't need anything else, since migrations should always be done sequentially in the timestamped order.

Karl