aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/MySQL')
-rw-r--r--OpenSim/Data/MySQL/Resources/002_InventoryStore.sql31
1 files changed, 31 insertions, 0 deletions
diff --git a/OpenSim/Data/MySQL/Resources/002_InventoryStore.sql b/OpenSim/Data/MySQL/Resources/002_InventoryStore.sql
new file mode 100644
index 0000000..c161a68
--- /dev/null
+++ b/OpenSim/Data/MySQL/Resources/002_InventoryStore.sql
@@ -0,0 +1,31 @@
1BEGIN;
2
3ALTER TABLE inventoryfolders change folderID folderIDold varchar(36);
4ALTER TABLE inventoryfolders change agentID agentIDold varchar(36);
5ALTER TABLE inventoryfolders change parentFolderID parentFolderIDold varchar(36);
6ALTER TABLE inventoryfolders add folderID char(36) not null default '00000000-0000-0000-0000-000000000000';
7ALTER TABLE inventoryfolders add agentID char(36) default NULL;
8ALTER TABLE inventoryfolders add parentFolderID char(36) default NULL;
9UPDATE inventoryfolders set folderID = folderIDold, agentID = agentIDold, parentFolderID = parentFolderIDold;
10ALTER TABLE inventoryfolders drop folderIDold;
11ALTER TABLE inventoryfolders drop agentIDold;
12ALTER TABLE inventoryfolders drop parentFolderIDold;
13ALTER TABLE inventoryfolders add constraint primary key(folderID);
14ALTER TABLE inventoryfolders add index inventoryfolders_agentid(agentID);
15ALTER TABLE inventoryfolders add index inventoryfolders_parentFolderid(parentFolderID);
16
17ALTER TABLE inventoryitems change inventoryID inventoryIDold varchar(36);
18ALTER TABLE inventoryitems change avatarID avatarIDold varchar(36);
19ALTER TABLE inventoryitems change parentFolderID parentFolderIDold varchar(36);
20ALTER TABLE inventoryitems add inventoryID char(36) not null default '00000000-0000-0000-0000-000000000000';
21ALTER TABLE inventoryitems add avatarID char(36) default NULL;
22ALTER TABLE inventoryitems add parentFolderID char(36) default NULL;
23UPDATE inventoryitems set inventoryID = inventoryIDold, avatarID = avatarIDold, parentFolderID = parentFolderIDold;
24ALTER TABLE inventoryitems drop inventoryIDold;
25ALTER TABLE inventoryitems drop avatarIDold;
26ALTER TABLE inventoryitems drop parentFolderIDold;
27ALTER TABLE inventoryitems add constraint primary key(inventoryID);
28ALTER TABLE inventoryitems add index inventoryitems_avatarid(avatarID);
29ALTER TABLE inventoryitems add index inventoryitems_parentFolderid(parentFolderID);
30
31COMMIT; \ No newline at end of file