joe_g Posted April 7, 2015 Share Posted April 7, 2015 EDIT, seems like the answer to my question is yes: https://github.com/jeanrajotte/upgradewire ----- Hi there, Slight newbie question about continuous integration: Sorry if this has been covered already - lengthy thread! Isn't it the case that if I would use the API to add/edit my fields and templates, (Everything can be done from the API, I guess?) I could script and automate any data model migration? Not using the GUI seems like a small price to pay for being able to do something similar to "migrate up" and have the server apply the latest data model changes? I could, already today, have a control file that look like something like: Current version: 2 version 1 migrate up: add field X migrate down: remove field X version 2: migrate up: rename field X to Y migrate down: rename field Y to X The import / export json thing is super awesome, but it's not for automated migration, I guess? Would this work? What do you think about it? J 1 Link to comment Share on other sites More sharing options...
mindplay.dk Posted April 7, 2015 Author Share Posted April 7, 2015 @joe_g this is basically what the module I've been working on does - except, it writes this file for you (as flat JSON files for source-control friendliness) creating a repeatable record of every change made to templates and fields. I don't work with ProcessWire in my day job anymore, and probably won't get around to finishing this... I wonder if I should go ahead and release it as-is. Would anyone be interested in taking over this project? 1 Link to comment Share on other sites More sharing options...
Hari KT Posted April 8, 2015 Share Posted April 8, 2015 Hey @mindplay.dk, I like to have a look at code, and if possible will try to contribute . Thank you. Like @joe_g mentioned, I was also having a similar thought of exporting the json via API and keeping on the module. And later exporting via the api than doing via the GUI . May be we can somehow add it to Wireshell ? 2 Link to comment Share on other sites More sharing options...
joe_g Posted April 8, 2015 Share Posted April 8, 2015 I understand, but to avoid all edge cases and have a stable solution already today — I could do this hand scripted version? Then, since I would test each migration locally I would be sure that it's working as it should before doing any migration on another server..? Link to comment Share on other sites More sharing options...
mindplay.dk Posted April 8, 2015 Author Share Posted April 8, 2015 I like to have a look at code, and if possible will try to contribute . Cool, are you on BitBucket? If not, create and account and let me know your username. 1 Link to comment Share on other sites More sharing options...
OrganizedFellow Posted August 5, 2015 Share Posted August 5, 2015 I don't work with ProcessWire in my day job anymore, and probably won't get around to finishing this... I wonder if I should go ahead and release it as-is. Would anyone be interested in taking over this project? AWW MANNN, I just read 120+ posts to get here, thinking a solution was near, lol. Amazing thread. I love all the ideas here. Like Joss, I am a poor coder and wish I could take over this project for you and our users Hopefully someone will come along and continue your work Thank you, for your contribution!!! Link to comment Share on other sites More sharing options...
mindplay.dk Posted August 6, 2015 Author Share Posted August 6, 2015 AWW MANNN, I just read 120+ posts to get here, thinking a solution was near, lol. Yeah, sorry about that. I just added an "EDIT" in bold to the original post, so others can decide whether they want to read through it all ;-) 1 Link to comment Share on other sites More sharing options...
Wanze Posted August 6, 2015 Share Posted August 6, 2015 @mindplay.dk I'd be interested in this project, could you add me on bitbucket? My username is "wanze". Thanks 1 Link to comment Share on other sites More sharing options...
mindplay.dk Posted August 6, 2015 Author Share Posted August 6, 2015 I have a free account and only 10 shares allowed, but... I think I will migrate the project to GitHub tonight and just open-source it. I will post when it's done. 3 Link to comment Share on other sites More sharing options...
mindplay.dk Posted August 6, 2015 Author Share Posted August 6, 2015 The source is on GitHub, knock yourself out https://github.com/mindplay-dk/SystemMigrations 7 Link to comment Share on other sites More sharing options...
Jonathan Lahijani Posted April 16, 2016 Share Posted April 16, 2016 For those interested in migrations similar to Rails and other web application frameworks, see LostKobrakai's Migrations module: https://processwire.com/talk/topic/13045-migrations/ 2 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