Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Plugin migrations for Redmine

I'm developing a plugin for Redmine. How do I create a migration for it?

If I use script/generate plugin_migration, it'll be placed in /db/migrate folder, but I need it to be in my plugin's folder.

like image 371
lightalloy Avatar asked Aug 03 '09 08:08

lightalloy


People also ask

How do I migrate to redmine?

dump Redmine database from the old server. restore it on the new server. run bundle exec rake db:migrate. run bin/rake redmine:plugins:migrate when needed (home made plugins)

What is redmine plugin?

The Redmine Budget plugin tracks revenues, costs, payroll costs, and the final profit of a project. It also allows you to track real money in the context of a specific pla... By Kirill Bezrukov (RedmineUP) (0) Kanban and checklists plugin.


1 Answers

You can use script/generate migration to create the migration and then move it into the plugin directory. When you move it, make sure to change from the timestamped format (20090719...) to the integer format (001_...)

I tend to just create the migrations by hand myself since they are pretty basic.

Eric Davis

like image 196
Eric Davis Avatar answered Sep 28 '22 19:09

Eric Davis