Mike Rockett Posted January 4, 2015 Share Posted January 4, 2015 So I've been wondering... What happens if a module gets an upgrade and it's DB table(s) need a schema update? Any decent way of handling this? Link to comment Share on other sites More sharing options...
netcarver Posted January 4, 2015 Share Posted January 4, 2015 @Mike I don't think there is a "standard" way but the best I've seen so far is this, from one of Teppo's modules. You should be able to get the idea from the code. 2 Link to comment Share on other sites More sharing options...
Mike Rockett Posted January 4, 2015 Author Share Posted January 4, 2015 That looks pretty decent indeed. Thanks Link to comment Share on other sites More sharing options...
kongondo Posted January 4, 2015 Share Posted January 4, 2015 @Mike, Another example here from FieldtypeComments. PS: Please post all module related development stuff to the Module/Plugins sub-forum/board: Module/Plugin Development https://processwire.com/talk/forum/19-moduleplugin-development/ This board is for 'Questions, answers and support for ProcessWire modules.' . Moving this thread there... 1 Link to comment Share on other sites More sharing options...
Mike Rockett Posted January 4, 2015 Author Share Posted January 4, 2015 Ah, my bad... I'm quick to click! Thanks Link to comment Share on other sites More sharing options...
bernhard Posted January 6, 2015 Share Posted January 6, 2015 thank you for this question mike, i was also wondering about this. i did some research and found some links: http://stackoverflow.com/questions/1607/mechanisms-for-tracking-db-schema-changes http://dbv.vizuina.com/ especially http://dbv.vizuina.com/documentation/#usage-revisions-create http://davedevelopment.co.uk/2008/04/14/how-to-simple-database-migrations-with-phing-and-dbdeploy.html do you guys use any tools for tracking DB changes or do you create your change-scripts/dumps manually like in the example of dbv? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now