#1 November 20, 2014 2:33pm

nate.lantz
Member
Registered: November 20, 2014
Posts: 7

Module Migrations

Hi,

I just noticed something that has put my department in a slight halt when it comes to building modules. Normally we write all of the code for sites/applications locally, and then push our changes to a git repo. Then on our server(s) we pull the updated code from the repo (a little more to it but thats the basics). Everything is fine until we write code for a module due to the module builder in the CMS over writing the module files in the custom folder.
I was thinking that a migration task would be helpful in situations like this. For EX: build a new module locally (just the code), and then have a separate file for the migration that goes with it to setup the tables in the db.

I got the idea from other frameworks like laravel, cibonfire, Rails ...

On the CMS side there could be another option to import a new module instead of adding/building a new one.

Disclaimer, I am still new to Bigtree so if this functionality already exists please excuse me and let me know how to do it.



Thanks

Offline

#2 November 20, 2014 2:40pm

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 974

Re: Module Migrations

Currently there's no way to do a database update migration from dev -> live, but you could create a module or template on development and use Packages to easily export and import to live. Updating the database content of an existing module/template/etc from dev and then moving it to live is still a fairly manual process unfortunately.

In 4.3 we're planning a feature called "Graft" that will track your changes via the audit trail, let you select the changes you want to migrate, and will create a migration package that can be moved to live and imported.

Offline

#3 November 20, 2014 2:56pm

nate.lantz
Member
Registered: November 20, 2014
Posts: 7

Re: Module Migrations

Ok thanks,

I missed that "Packages" part. I'll try to find the docs for it.

Again thank you for the quick response!

Offline

#4 November 20, 2014 3:00pm

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 974

Re: Module Migrations

Looks like we may be missing the documentation on Packages -- hopefully that will be fleshed up with the 4.2 documentation release.
It's fairly self explanatory when building -- you choose the field types, modules, callouts, templates, and feeds. BigTree auto populates the files and tables related to that data and allows you to add more files and tables. You add some package meta data (which will be used in the Packages section of this site in the future) and it creates a zip file.

The zip file can then be imported into another site -- it'll tell you if there are any file collisions and install all the database content.

Offline

#5 November 20, 2014 3:32pm

nate.lantz
Member
Registered: November 20, 2014
Posts: 7

Re: Module Migrations

Thank you very much!

Offline

Board footer

Powered by FluxBB

The Discussion Forum is not available on displays of this size.