Plugin migrations for Redmine

给你一囗甜甜゛ 提交于 2019-12-04 02:59:28

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

The way most plugins do it (thinking of restful_authentication and others) is to have a generator that needs to be run when you install the plugin. This would generate the migration and put it in db/migrate where it then becomes part of your project migrations. I can't really think of a better way to do this. Using something like desert can help, but adds its own bit of overhead as well.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!