开发者

Plugin update strategies

开发者 https://www.devze.com 2023-01-04 03:10 出处:网络
I\'m developing a plugin which is used in several applications. This plugin is a rails engine with own controllers, models and routes. The controllers, views and models are being generated via simple

I'm developing a plugin which is used in several applications. This plugin is a rails engine with own controllers, models and routes. The controllers, views and models are being generated via simple generator in plugin. Also generator creates migrations for models' tables.

The problem I'm facing now is that on any updates to plugin models (i.e. table structures) I have to update migration. Also I hav开发者_如何学Ce to update plugin in all the apps that uses that plugin. Then - I have to regenerate the migration and rerun it all over again with renewed timestamp which forces me to not generate any custom migrations for plugin models (i.e. adjust tables for app-specific behavior).

Can you share any ideas on how to manage migrations in plugins? Especially in situations when one needs to update template of migration to be generated.


Do you know Hobo? Maybe, Hobo's source code helps you.

Hobo

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号