Just to clarify...
As a result of running migrations you''ll get a table in your db called
''schema_info'' that has only one column (version). That table
is used
to track the number of the last migration run against the DB. So, if
you check out the project on a new PC, create the DB (rake
db:create:all), and migrate, you''ll create the schema_info table with
no value in version, then run each migration in turn until you hit the
last. In the future, if you add more migrations they can also be
checked out to the other PC and db:migrate will recognize that the
current migration set has newer migration than is reflected in
schema_info and will only run the unexecuted migrations.
BTW, the actual implementation of this is scheduled for change in 2.1
(timestamped migrations) but the net result is the same.
On May 6, 10:04 pm, validkeys
<kyle.da...-s5CVtH8h5JrZ3NRrNVlbw1aTQe2KTcn/@public.gmane.org>
wrote:> quick n00b question. If I am working on one computer on a new rails
> app, commit it to SVN, and then checkout to another computer. Once I
> create the database (without tables), When i run rake db:migrate, will
> it run all migrations on the new computer so that the database
> structure is the exact same as the original computer that I was
> working on?
>
> I guess the question here is if you move a rails app with several
> migrations to another computer and run the rake script, will it
> iterate through all migrations effectively creating the same database
> or will it only run the last migration.
>
> Thanks
>
> Im sure this question is retarded.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---