Scripting to update existing item in CMS database

We will be adding a new field to all our existing content types.At this point we already have thousands of content items created, published out and we would like to populate this new field for the existing items with some value.

I am guessing I should be able to write a script to update this on all the existing items in the Rx database. But I don’t know the database well enough to do so.

Is this possible? What tables do I need to look into that store all the information on the content items created?


Given that you’re adding it to all your content types, I’m going to assume it’s a shared field. I’m also going to assume that you’re using the system shared fields definition file: Workbench > Shared Fields > rxs_ct_shared.xml.

If those assumptions are correct, you want to look at the RXS_CT_SHARED table. You should find your column there.

No I am using local fields as I saw some issues updating the shared tables. So now I have to update each of the Content type tables. I am guessing that whatever I am doing is alright . Please point out any issues which I dont forsee

I saw that there is a _BAK table created for each content type. What is the purpose of that?

The CM System backs up tables when there is a change to a content type. The “XXXX_BAK” if the backup of your content type’s original table.

When you add a new local field, and you promote the content type (and its schema), the old table is renamed with the _BAK suffix. Then the data is copied from the old table to the new table. However, if you run out of database space, the inserts on the new table may not complete. In which case, you’ll be happy you’ve got that _BAK table.