custom Models and future CE migrations » CommunityEngine | A social networking plugin for Ruby on Rails.

CommunityEngine

Welcome! Log In or Sign up

bobics's Blog

custom Models and future CE migrations

I'm looking to override the Users model to fit multiple types of users (someone asked a related question, link below).  My question is, do you have any suggestions for how to handle future migrations from CE?  For example, I'm thinking if it something as simple as CE creates a new column (e.g. favorite_color) and as long as I don't delete any columns, things should migrate fine.  Is there any case I should watch out for and do you have any suggested "best practices" to make sure migrations go smoothly?  For example, I've read that using the Engines plugin, I should run "script/generate plugin_migration".  Also, this: http://rails-engines.org/development/common-issues-when-overloading-code-from-plugin

Thank you for sharing your work!

-bobics

related question I was referring to above:

http://demo.communityengine.org/rapatapat/posts/50-Excuse-Me-Still-Deciding-#comments

Post Comments

Add Your Comment!

Log in to leave a comment or Create an account

Thanks for the info and pointing me to the Google Group.

Like you said, as long as you don't remove existing columns from User, you should be fine (provided future migrations don't conflict with what you add, which is unlikely). You don't need to generate a plugin migration, you just generate a normal migration and alter the users table.

Also, you're better off posting questions to the Google Goup (more likely to get answered there).

» All comments
» Comments RSS

Author

bobics
bobics
I like cheese!
Member since: 10/14/08
1 post
RSS feed

CommunityEngine Rocks!