This project is archived and is in readonly mode.
Changeset [75f8ac6ea71e4b2337f870b91ac05df98f33a8d2] by Piotr Sarnacki
Revision 75f8ac6ea71e4b2337f870b91ac05df98f33a8d2,
committed by Piotr Sarnacki
· September 3rd, 2010 @ 09:59 PM
Implemented ActiveRecord::Migrations#copy based on James Adam's idea
ActiveRecord::Migration#copy allows to copy migrations from one
place
to another, changing migrations versions and adding scope to
filename.
For example:
ActiveRecord::Migration.copy("db/migrate",
:blog_engine => "vendor/gems/blog/db/migrate")
will copy all migrations from vendor/gems/blog/db/migrate to
db/migrate
with such format:
Versions of copied migrations will be reversioned to be appended
after
migrations that already exists in db/migrate
http://github.com/rails/rails/commit/75f8ac6ea71e4b2337f870b91ac05d...
11 changed files
-
A
activerecord/test/migrations/to_copy/1_people_have_hobbies.rb -
A
activerecord/test/migrations/to_copy/2_people_have_descriptions.rb -
A
activerecord/test/migrations/to_copy_with_timestamps/20090101010101_people_have_hobbies.rb -
A
activerecord/test/migrations/to_copy_with_timestamps/20090101010202_people_have_descriptions.rb -
A
activerecord/test/migrations/valid_with_timestamps/20100101010101_people_have_last_names.rb -
A
activerecord/test/migrations/valid_with_timestamps/20100201010101_we_need_reminders.rb -
A
activerecord/test/migrations/valid_with_timestamps/20100301010101_innocent_jointable.rb -
M
activerecord/lib/active_record/migration.rb -
M
activerecord/lib/rails/generators/active_record.rb -
M
activerecord/test/cases/helper.rb -
M
activerecord/test/cases/migration_test.rb