Dev vs Live Site Syncing

5 posts by 2 authors in: Forums > CMS Builder
Last Post: July 1, 2015   (RSS)

By Dave - July 1, 2015

Hi theclicklab, 

Adding fields is easy, you just upload your new schemas.  Renaming or deleting fields is a bit more complicated.

When you're ready, what I'd do is make a backup of the live site (dev2) and try upgrading that site first to see where you might run into any problems.

And also, make sure backup live (both MySQL and FTP) before making any changes.

One last trick, you can use a file compare tool (like winmerge.com) to compare schema files in /data/schema/ to see what has changed between two sites.  I often do that rather than visually comparing when trying to determine what has been changed.

Hope that helps!

Dave Edis - Senior Developer
interactivetools.com

By theclicklab - July 1, 2015

OK Thanks Dave, does uploading modified schemas update the DB as well?

By Dave - July 1, 2015

Not automatically, but whenever you click "Section Editors" it checks for new fields and adds them and will display a notice at the top of the page if it found anything.

It doesn't remove fields (it's non-destructive) and would interpret renamed fields as an erased and added field.  

Also if a field isn't in the CMSB schema but still in MySQL it will show in the field editor as a blank field so you can then delete it (which will delete it from MySQL) or add field information for CMSB to use.

So if you upload a schema with...

  • added fields, they'll get created automatically when you click "Section Editors"
  • removed fields, they'll show as unnamed field since they'd still exist in MySQL on live (you'd need to manually erase them)
  • renamed fields, it would create the new field automatically and show the old field as an unnamed field.

Hope that makes sense!

Dave Edis - Senior Developer
interactivetools.com

By theclicklab - July 1, 2015

Thats a great explanation and really helpful. Thanks!!