From 2284c8509f29b8766794f6482839cd9bc5e9f300 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Thu, 7 May 2009 14:20:32 +0000 Subject: * Consistently used dashed uuid format for mysql region data, as is done for all other tables * This revision contains a mysql data migration. Please backup your mysql region database as a precaution before using this code. * I also advise that you do a runprebuild[.sh|.bat] and a clean build ("nant clean build" if you're using the command line). * This change is needed for future id schemes --- OpenSim/Data/MySQL/Resources/028_RegionStore.sql | 79 ++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 OpenSim/Data/MySQL/Resources/028_RegionStore.sql (limited to 'OpenSim/Data/MySQL/Resources') diff --git a/OpenSim/Data/MySQL/Resources/028_RegionStore.sql b/OpenSim/Data/MySQL/Resources/028_RegionStore.sql new file mode 100644 index 0000000..078394f --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/028_RegionStore.sql @@ -0,0 +1,79 @@ +BEGIN; + +update terrain + set RegionUUID = concat(substr(RegionUUID, 1, 8), "-", substr(RegionUUID, 9, 4), "-", substr(RegionUUID, 13, 4), "-", substr(RegionUUID, 17, 4), "-", substr(RegionUUID, 21, 12)) + where RegionUUID not like '%-%'; + + +update landaccesslist + set LandUUID = concat(substr(LandUUID, 1, 8), "-", substr(LandUUID, 9, 4), "-", substr(LandUUID, 13, 4), "-", substr(LandUUID, 17, 4), "-", substr(LandUUID, 21, 12)) + where LandUUID not like '%-%'; + +update landaccesslist + set AccessUUID = concat(substr(AccessUUID, 1, 8), "-", substr(AccessUUID, 9, 4), "-", substr(AccessUUID, 13, 4), "-", substr(AccessUUID, 17, 4), "-", substr(AccessUUID, 21, 12)) + where AccessUUID not like '%-%'; + + +update prims + set UUID = concat(substr(UUID, 1, 8), "-", substr(UUID, 9, 4), "-", substr(UUID, 13, 4), "-", substr(UUID, 17, 4), "-", substr(UUID, 21, 12)) + where UUID not like '%-%'; + +update prims + set RegionUUID = concat(substr(RegionUUID, 1, 8), "-", substr(RegionUUID, 9, 4), "-", substr(RegionUUID, 13, 4), "-", substr(RegionUUID, 17, 4), "-", substr(RegionUUID, 21, 12)) + where RegionUUID not like '%-%'; + +update prims + set SceneGroupID = concat(substr(SceneGroupID, 1, 8), "-", substr(SceneGroupID, 9, 4), "-", substr(SceneGroupID, 13, 4), "-", substr(SceneGroupID, 17, 4), "-", substr(SceneGroupID, 21, 12)) + where SceneGroupID not like '%-%'; + +update prims + set CreatorID = concat(substr(CreatorID, 1, 8), "-", substr(CreatorID, 9, 4), "-", substr(CreatorID, 13, 4), "-", substr(CreatorID, 17, 4), "-", substr(CreatorID, 21, 12)) + where CreatorID not like '%-%'; + +update prims + set OwnerID = concat(substr(OwnerID, 1, 8), "-", substr(OwnerID, 9, 4), "-", substr(OwnerID, 13, 4), "-", substr(OwnerID, 17, 4), "-", substr(OwnerID, 21, 12)) + where OwnerID not like '%-%'; + +update prims + set GroupID = concat(substr(GroupID, 1, 8), "-", substr(GroupID, 9, 4), "-", substr(GroupID, 13, 4), "-", substr(GroupID, 17, 4), "-", substr(GroupID, 21, 12)) + where GroupID not like '%-%'; + +update prims + set LastOwnerID = concat(substr(LastOwnerID, 1, 8), "-", substr(LastOwnerID, 9, 4), "-", substr(LastOwnerID, 13, 4), "-", substr(LastOwnerID, 17, 4), "-", substr(LastOwnerID, 21, 12)) + where LastOwnerID not like '%-%'; + + +update primshapes + set UUID = concat(substr(UUID, 1, 8), "-", substr(UUID, 9, 4), "-", substr(UUID, 13, 4), "-", substr(UUID, 17, 4), "-", substr(UUID, 21, 12)) + where UUID not like '%-%'; + + +update land + set UUID = concat(substr(UUID, 1, 8), "-", substr(UUID, 9, 4), "-", substr(UUID, 13, 4), "-", substr(UUID, 17, 4), "-", substr(UUID, 21, 12)) + where UUID not like '%-%'; + +update land + set RegionUUID = concat(substr(RegionUUID, 1, 8), "-", substr(RegionUUID, 9, 4), "-", substr(RegionUUID, 13, 4), "-", substr(RegionUUID, 17, 4), "-", substr(RegionUUID, 21, 12)) + where RegionUUID not like '%-%'; + +update land + set OwnerUUID = concat(substr(OwnerUUID, 1, 8), "-", substr(OwnerUUID, 9, 4), "-", substr(OwnerUUID, 13, 4), "-", substr(OwnerUUID, 17, 4), "-", substr(OwnerUUID, 21, 12)) + where OwnerUUID not like '%-%'; + +update land + set GroupUUID = concat(substr(GroupUUID, 1, 8), "-", substr(GroupUUID, 9, 4), "-", substr(GroupUUID, 13, 4), "-", substr(GroupUUID, 17, 4), "-", substr(GroupUUID, 21, 12)) + where GroupUUID not like '%-%'; + +update land + set MediaTextureUUID = concat(substr(MediaTextureUUID, 1, 8), "-", substr(MediaTextureUUID, 9, 4), "-", substr(MediaTextureUUID, 13, 4), "-", substr(MediaTextureUUID, 17, 4), "-", substr(MediaTextureUUID, 21, 12)) + where MediaTextureUUID not like '%-%'; + +update land + set SnapshotUUID = concat(substr(SnapshotUUID, 1, 8), "-", substr(SnapshotUUID, 9, 4), "-", substr(SnapshotUUID, 13, 4), "-", substr(SnapshotUUID, 17, 4), "-", substr(SnapshotUUID, 21, 12)) + where SnapshotUUID not like '%-%'; + +update land + set AuthbuyerID = concat(substr(AuthbuyerID, 1, 8), "-", substr(AuthbuyerID, 9, 4), "-", substr(AuthbuyerID, 13, 4), "-", substr(AuthbuyerID, 17, 4), "-", substr(AuthbuyerID, 21, 12)) + where AuthbuyerID not like '%-%'; + +COMMIT; \ No newline at end of file -- cgit v1.1