Copying Schema?

2 posts by 2 authors in: Forums > CMS Builder
Last Post: November 27, 2014   (RSS)

Hello, All -

I have a couple of CMSB websites which share much of the same code. As I develop one site I often have to go back and develop the other to try and keep the 2 identical. It's like a drawn out game of catch-up!

I recently made a fairly big change to one of the sites by adding several new rows to one of the tables. I now want to copy the change over to site 2.

The simplest thing to do would be to create the new fields manually on the second site - but that's tedious! There's also the risk of mistakes.

I am very tempted to try and export the updated schema from one site and upload it on to the other. However, I'm not sure what will happen!

Can someone please allay my fears - or suggest another approach?

:0)

Perch

By Dave - November 27, 2014

Hi Perch,

First, click "Backup Database" in both CMSs and download a backup copy of them.

Next, you might want to use a compare tool likeĀ http://winmerge.org/ to confirm the only different is the added fields (or perhaps field ordering)

If that's the only difference, you can safely copy the updated schema to the site you want to update.

After doing that click on "Section Editors" and it will automatically check for missing fields in the schemas and it should add them automatically and display a notice that it did.

Hope that helps!

PS: Note that this doesn't work for erasing or renaming fields, only for adding fields.

Dave Edis - Senior Developer
interactivetools.com