aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite/Resources
diff options
context:
space:
mode:
authorJustin Clarke Casey2009-04-09 18:17:52 +0000
committerJustin Clarke Casey2009-04-09 18:17:52 +0000
commit39c63029727f895d72eb5b4ebbf6a8f5a002201d (patch)
tree98af667d1d2c599c7e906292d692ff15928a2077 /OpenSim/Data/SQLite/Resources
parent* Migrate UUID representations in SQLite inventory store to dashed format (diff)
downloadopensim-SC_OLD-39c63029727f895d72eb5b4ebbf6a8f5a002201d.zip
opensim-SC_OLD-39c63029727f895d72eb5b4ebbf6a8f5a002201d.tar.gz
opensim-SC_OLD-39c63029727f895d72eb5b4ebbf6a8f5a002201d.tar.bz2
opensim-SC_OLD-39c63029727f895d72eb5b4ebbf6a8f5a002201d.tar.xz
* Improve inventory uuid conversions to make sure that we aren't converting anything that already contains a -
* Among other things, this means that if a migration is interrupted, it can simply be retried
Diffstat (limited to 'OpenSim/Data/SQLite/Resources')
-rw-r--r--OpenSim/Data/SQLite/Resources/004_InventoryStore.sql37
1 files changed, 29 insertions, 8 deletions
diff --git a/OpenSim/Data/SQLite/Resources/004_InventoryStore.sql b/OpenSim/Data/SQLite/Resources/004_InventoryStore.sql
index 5985d80..f640f80 100644
--- a/OpenSim/Data/SQLite/Resources/004_InventoryStore.sql
+++ b/OpenSim/Data/SQLite/Resources/004_InventoryStore.sql
@@ -1,15 +1,36 @@
1BEGIN; 1BEGIN;
2 2
3update inventoryitems 3update inventoryitems
4 set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21), 4 set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21)
5 assetID = substr(assetID, 1, 8) || "-" || substr(assetID, 9, 4) || "-" || substr(assetID, 13, 4) || "-" || substr(assetID, 17, 4) || "-" || substr(assetID, 21), 5 where UUID not like '%-%';
6 parentFolderID = substr(parentFolderID, 1, 8) || "-" || substr(parentFolderID, 9, 4) || "-" || substr(parentFolderID, 13, 4) || "-" || substr(parentFolderID, 17, 4) || "-" || substr(parentFolderID, 21), 6
7 avatarID = substr(avatarID, 1, 8) || "-" || substr(avatarID, 9, 4) || "-" || substr(avatarID, 13, 4) || "-" || substr(avatarID, 17, 4) || "-" || substr(avatarID, 21), 7update inventoryitems
8 creatorsID = substr(creatorsID, 1, 8) || "-" || substr(creatorsID, 9, 4) || "-" || substr(creatorsID, 13, 4) || "-" || substr(creatorsID, 17, 4) || "-" || substr(creatorsID, 21); 8 set assetID = substr(assetID, 1, 8) || "-" || substr(assetID, 9, 4) || "-" || substr(assetID, 13, 4) || "-" || substr(assetID, 17, 4) || "-" || substr(assetID, 21)
9 where assetID not like '%-%';
10
11update inventoryitems
12 set parentFolderID = substr(parentFolderID, 1, 8) || "-" || substr(parentFolderID, 9, 4) || "-" || substr(parentFolderID, 13, 4) || "-" || substr(parentFolderID, 17, 4) || "-" || substr(parentFolderID, 21)
13 where parentFolderID not like '%-%';
14
15update inventoryitems
16 set avatarID = substr(avatarID, 1, 8) || "-" || substr(avatarID, 9, 4) || "-" || substr(avatarID, 13, 4) || "-" || substr(avatarID, 17, 4) || "-" || substr(avatarID, 21)
17 where avatarID not like '%-%';
18
19update inventoryitems
20 set creatorsID = substr(creatorsID, 1, 8) || "-" || substr(creatorsID, 9, 4) || "-" || substr(creatorsID, 13, 4) || "-" || substr(creatorsID, 17, 4) || "-" || substr(creatorsID, 21)
21 where creatorsID not like '%-%';
22
23
24update inventoryfolders
25 set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21)
26 where UUID not like '%-%';
27
28update inventoryfolders
29 set agentID = substr(agentID, 1, 8) || "-" || substr(agentID, 9, 4) || "-" || substr(agentID, 13, 4) || "-" || substr(agentID, 17, 4) || "-" || substr(agentID, 21)
30 where agentID not like '%-%';
9 31
10update inventoryfolders 32update inventoryfolders
11 set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21), 33 set parentID = substr(parentID, 1, 8) || "-" || substr(parentID, 9, 4) || "-" || substr(parentID, 13, 4) || "-" || substr(parentID, 17, 4) || "-" || substr(parentID, 21)
12 agentID = substr(agentID, 1, 8) || "-" || substr(agentID, 9, 4) || "-" || substr(agentID, 13, 4) || "-" || substr(agentID, 17, 4) || "-" || substr(agentID, 21), 34 where parentID not like '%-%';
13 parentID = substr(parentID, 1, 8) || "-" || substr(parentID, 9, 4) || "-" || substr(parentID, 13, 4) || "-" || substr(parentID, 17, 4) || "-" || substr(parentID, 21);
14 35
15COMMIT; 36COMMIT;