[opencms-dev] re-arranging resource-ids

Christoph Kukulies kuku at physik.rwth-aachen.de
Mon Jul 14 18:28:35 CEST 2014


I found that I'm always running into trouble with an external site which 
is a copy of the internal site, due to the fact that resource ids are 
the same between the two sites.

I can only get around this by prior deleting of an object in the VFS 
before replacing it or copying one aside of it with a different name but 
same id.

Now the idea came to me that it would be possible to walk through the 
opencms database with a clever set of SQL statements, that first 
collects all IDs and rolls the dice to obtain a replacement id for it.

With that, go through all tables and columns of the opencms database, 
find that ID and replace it by a different one. I found that 
resource-IDs have the column type VARCHAR(36). Can one be sure that 
every resource ID is a VARCHAR(36)? And that there are no VARCHAR(36) 
used for other items?

Would that be possible? Are there easier provision to achieve that?

--
Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de



More information about the opencms-dev mailing list