We have setup several development Modx systems (against my vote to use only one).
How can we "easy" combine these to one final Modx.
The idea was that each developer is working on one system with his/her pages and so not disturb others. I could not find a way to use SVN to combine these systems.
E.
-
MODX Staff
- 10,725 Posts
There really is no way to easily combine these systems since the content is stored in the database, other than making each developer responsible for migrating content updates, and even then if what you are doing depends on the primary key of a document that might be different in the various databases, you would then have to go through the painful process of re-keying and filtering the content. This could be done using some development automation tools, like Ant, but it’s no picnic to get it right and handle all the corner cases.
I personally use SVN to do development, making a local or shared workspace to edit php includes1. My typical workflow is, get the latest dump of the production database, make my file and database content changes in a local or shared deployment, make sure I can repeat the content changes to the database, then commit to SVN. I can then promote the changes to production by updating from SVN and either manually repeating the content changes, or using a SQL script I prepare that can apply the changes without depending on primary keys (i.e. create a dump of the changed/added data records and remove any auto_increment fields, add any needed records to cross-reference tables, etc.). Of course, which way is best depends on the scope and type of changes being made.
I know this is not at all optimal, and this will all change in the near future with the introduction of transport packages, which will allow users to package database and related file content into zip files that can be distributed and applied (i.e. installed/upgraded) in various instances. Until then, you’ll have to find the best way for you to "merge" the changes being made to the MODx managed content along with any files you keep in SVN.
1 - as a note, I use a single snippet/plugin/module in many of my MODx sites that I use to include these things via a parameter that points at the php file. I do this for many reasons, including to isolate my logic changes to the file system so I can manage it easily with SVN, as well as to reduce the main cache file size in MODx.