Question about creating migrations from plugins

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?


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs