# Additional plugin migrations rake tasks

**URL:** <https://www.ruby-forum.com/t/additional-plugin-migrations-rake-tasks/129542>\
**Category:** Engines Development\
**Created:** [February 19, 2008, 1:11pm UTC](https://www.ruby-forum.com/t/additional-plugin-migrations-rake-tasks/129542 "2008-02-19T13:11:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sven\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b5e925/32.png) [@Sven\_F](https://www.ruby-forum.com/u/Sven_F)\
**Post date:** [February 19, 2008, 1:11pm UTC](https://www.ruby-forum.com/t/additional-plugin-migrations-rake-tasks/129542/1 "2008-02-19T13:11:39Z")

</div>

I’d like to add these rake tasks to Engines:  
[http://pastie.caboo.se/154218](http://pastie.caboo.se/154218)

The background is that we could use something like this for Mephisto  
to give users a way to avoid version number clashes with their plugin  
migrations and future Mephisto migrations. Also I’ve seen situations  
where script/generated plugin\_migrations causes version number clashes  
when two developers worked on different plugins and then tried to  
check their generated migrations in to the repository.

The rake tasks above generally avoid these issues. They certainly  
aren’t suited for every situation (that’s why the plugin\_migration  
generator exists), but I believe they work fine for quite some others.

–  
sven fuchs removed\_email\_address@domain.invalid  
artweb design [http://www.artweb-design.de](http://www.artweb-design.de)  
grünberger 65 + 49 (0) 30 - 47 98 69 96 (phone)  
d-10245 berlin + 49 (0) 171 - 35 20 38 4 (mobile)

---

<div class="post-metadata">

**Author:** ![Sven\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b5e925/32.png) [@Sven\_F](https://www.ruby-forum.com/u/Sven_F)\
**Post date:** [February 19, 2008, 3:33pm UTC](https://www.ruby-forum.com/t/additional-plugin-migrations-rake-tasks/129542/2 "2008-02-19T15:33:48Z")

</div>

This seems fine - thought it should be clear that for general plugin  
usage in “normal” rails development, the plugin\_migration generator is  
the tool to use.

Directly running migrations from within plugins (via such rake tasks)  
should only be required when you need multiple migration streams (i.e.  
when building plugins for an externally-maintained application, like  
Mephisto).

Go ahead and commit 🙂

James

---

<div class="post-metadata">

**Author:** ![Sven\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b5e925/32.png) [@Sven\_F](https://www.ruby-forum.com/u/Sven_F)\
**Post date:** [February 19, 2008, 4:59pm UTC](https://www.ruby-forum.com/t/additional-plugin-migrations-rake-tasks/129542/3 "2008-02-19T16:59:38Z")

</div>

Am 19.02.2008 um 15:33 schrieb James A.:

> This seems fine - thought it should be clear that for general plugin  
> usage in “normal” rails development, the plugin\_migration generator is  
> the tool to use.
> 
> Directly running migrations from within plugins (via such rake tasks)  
> should only be required when you need multiple migration streams (i.e.  
> when building plugins for an externally-maintained application, like  
> Mephisto).

Yep, sure.

> Go ahead and commit 🙂

Just wanted to do so. But I’m confused about the repository layout.  
Would that change go to

[http://svn.rails-engines.org/engines/trunk/](http://svn.rails-engines.org/engines/trunk/)

or

[http://svn.rails-engines.org/plugins/engines/](http://svn.rails-engines.org/plugins/engines/)

or both?

–  
sven fuchs [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
artweb design [http://www.artweb-design.de](http://www.artweb-design.de)  
grünberger 65 + 49 (0) 30 - 47 98 69 96 (phone)  
d-10245 berlin + 49 (0) 171 - 35 20 38 4 (mobile)

---

<div class="post-metadata">

**Author:** ![Sven\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b5e925/32.png) [@Sven\_F](https://www.ruby-forum.com/u/Sven_F)\
**Post date:** [February 19, 2008, 6:35pm UTC](https://www.ruby-forum.com/t/additional-plugin-migrations-rake-tasks/129542/4 "2008-02-19T18:35:27Z")

</div>

On 19/02/2008, Sven F. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Just wanted to do so. But I’m confused about the repository layout.  
> Would that change go to
> 
> [http://svn.rails-engines.org/engines/trunk/](http://svn.rails-engines.org/engines/trunk/)

[http://svn.rails-engines.org/README](http://svn.rails-engines.org/README) should be useful, but in general:

/plugins/engines only exists for the ‘script/plugin’ script, which was  
(until recently, I believe) deeply confused by trunk/branches/tags as  
the endpoints of an SVN url

/engines is the part of the repository dedicated to the engines plugin  
itself

/engines/trunk is the current development ‘branch’

/engines/tags/rel\_1.2.1 is a tag of development that’s stable (and  
will never be changed - use this for externals should you wish)

> or  
> [http://svn.rails-engines.org/plugins/engines/](http://svn.rails-engines.org/plugins/engines/)

this is basically a special tag for ‘script/plugin’. I’ll update it  
when we’re comfortable that we have a version that’s stable and  
working for the current release of Rails. Which could be now, given  
the lack of noise on the issue tracker 🙂

James

---

<div class="post-metadata">

**Author:** ![Sven\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b5e925/32.png) [@Sven\_F](https://www.ruby-forum.com/u/Sven_F)\
**Post date:** [February 20, 2008, 7:41pm UTC](https://www.ruby-forum.com/t/additional-plugin-migrations-rake-tasks/129542/5 "2008-02-20T19:41:41Z")

</div>

Hi James,

thanks for the guidance 🙂

I’ve now commited to engines/trunk:

[http://svn.rails-engines.org/engines/trunk/tasks/engines.rake](http://svn.rails-engines.org/engines/trunk/tasks/engines.rake)

Thanks!

Am 19.02.2008 um 18:35 schrieb James A.:

> the endpoints of an SVN url
> 
> > [http://svn.rails-engines.org/plugins/engines/](http://svn.rails-engines.org/plugins/engines/)  
> > ~
> 
> * * *
> 
> Engine-Developers mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [http://lists.rails-engines.org/listinfo.cgi/engine-developers-rails-engines.org](http://lists.rails-engines.org/listinfo.cgi/engine-developers-rails-engines.org)

–  
sven fuchs [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
artweb design [http://www.artweb-design.de](http://www.artweb-design.de)  
grünberger 65 + 49 (0) 30 - 47 98 69 96 (phone)  
d-10245 berlin + 49 (0) 171 - 35 20 38 4 (mobile)
