# Question about creating migrations from plugins

**URL:** <https://www.ruby-forum.com/t/question-about-creating-migrations-from-plugins/173249>\
**Category:** Rails\
**Created:** [August 5, 2009, 4:51pm UTC](https://www.ruby-forum.com/t/question-about-creating-migrations-from-plugins/173249 "2009-08-05T16:51:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cswebgrl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/edb3f5/32.png) [@cswebgrl](https://www.ruby-forum.com/u/cswebgrl)\
**Post date:** [August 5, 2009, 4:51pm UTC](https://www.ruby-forum.com/t/question-about-creating-migrations-from-plugins/173249/1 "2009-08-05T16:51:29Z")

</div>

I’m finalizing a plugin and am wondering, what is the preferred method  
is for adding migrations/new tables from a plugin to an app?

My migration file creates a table that will stand alone.

One method appears to be simply copying the migration file to the app’s  
migration folder in the generator file. Another options seems to be  
uniquely timestamping the file within the plugin’s db/migrate folder and  
having it run separately using db:migrate:plugin\_name

Still another method is to create a plugin\_migration\_generator.rb file  
that goes through and assigns attributes and builds the file.

Any thoughts on what is the preferred method for plugins?

Thanks!
