aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/Resources/InventoryStore.migrations
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/MySQL/Resources/InventoryStore.migrations')
-rw-r--r--OpenSim/Data/MySQL/Resources/InventoryStore.migrations143
1 files changed, 38 insertions, 105 deletions
diff --git a/OpenSim/Data/MySQL/Resources/InventoryStore.migrations b/OpenSim/Data/MySQL/Resources/InventoryStore.migrations
index ca2fe11..2d4384c 100644
--- a/OpenSim/Data/MySQL/Resources/InventoryStore.migrations
+++ b/OpenSim/Data/MySQL/Resources/InventoryStore.migrations
@@ -1,109 +1,42 @@
1:VERSION 1 # ------------ 1:VERSION 7 # ------------
2BEGIN; 2BEGIN;
3 3
4CREATE TABLE `inventoryfolders` ( 4CREATE TABLE IF NOT EXISTS `inventoryitems` (
5 `folderID` varchar(36) NOT NULL default '', 5 `assetID` varchar(36) DEFAULT NULL,
6 `agentID` varchar(36) default NULL, 6 `assetType` int(11) DEFAULT NULL,
7 `parentFolderID` varchar(36) default NULL, 7 `inventoryName` varchar(64) DEFAULT NULL,
8 `folderName` varchar(64) default NULL, 8 `inventoryDescription` varchar(128) DEFAULT NULL,
9 `type` smallint NOT NULL default 0, 9 `inventoryNextPermissions` int(10) unsigned DEFAULT NULL,
10 `version` int NOT NULL default 0, 10 `inventoryCurrentPermissions` int(10) unsigned DEFAULT NULL,
11 PRIMARY KEY (`folderID`), 11 `invType` int(11) DEFAULT NULL,
12 KEY `owner` (`agentID`), 12 `creatorID` varchar(255) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
13 KEY `parent` (`parentFolderID`) 13 `inventoryBasePermissions` int(10) unsigned NOT NULL DEFAULT '0',
14) ENGINE=MyISAM DEFAULT CHARSET=utf8; 14 `inventoryEveryOnePermissions` int(10) unsigned NOT NULL DEFAULT '0',
15 15 `salePrice` int(11) NOT NULL DEFAULT '0',
16CREATE TABLE `inventoryitems` ( 16 `saleType` tinyint(4) NOT NULL DEFAULT '0',
17 `inventoryID` varchar(36) NOT NULL default '', 17 `creationDate` int(11) NOT NULL DEFAULT '0',
18 `assetID` varchar(36) default NULL, 18 `groupID` varchar(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
19 `assetType` int(11) default NULL, 19 `groupOwned` tinyint(4) NOT NULL DEFAULT '0',
20 `parentFolderID` varchar(36) default NULL, 20 `flags` int(11) unsigned NOT NULL DEFAULT '0',
21 `avatarID` varchar(36) default NULL, 21 `inventoryID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
22 `inventoryName` varchar(64) default NULL, 22 `avatarID` char(36) DEFAULT NULL,
23 `inventoryDescription` varchar(128) default NULL, 23 `parentFolderID` char(36) DEFAULT NULL,
24 `inventoryNextPermissions` int(10) unsigned default NULL, 24 `inventoryGroupPermissions` int(10) unsigned NOT NULL DEFAULT '0',
25 `inventoryCurrentPermissions` int(10) unsigned default NULL, 25 PRIMARY KEY (`inventoryID`),
26 `invType` int(11) default NULL, 26 KEY `inventoryitems_avatarid` (`avatarID`),
27 `creatorID` varchar(36) default NULL, 27 KEY `inventoryitems_parentFolderid` (`parentFolderID`)
28 `inventoryBasePermissions` int(10) unsigned NOT NULL default 0, 28) ENGINE=InnoDB DEFAULT CHARSET=utf8;
29 `inventoryEveryOnePermissions` int(10) unsigned NOT NULL default 0, 29
30 `salePrice` int(11) NOT NULL default 0, 30CREATE TABLE IF NOT EXISTS `inventoryfolders` (
31 `saleType` tinyint(4) NOT NULL default 0, 31 `folderName` varchar(64) DEFAULT NULL,
32 `creationDate` int(11) NOT NULL default 0, 32 `type` smallint(6) NOT NULL DEFAULT '0',
33 `groupID` varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000', 33 `version` int(11) NOT NULL DEFAULT '0',
34 `groupOwned` tinyint(4) NOT NULL default 0, 34 `folderID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
35 `flags` int(11) unsigned NOT NULL default 0, 35 `agentID` char(36) DEFAULT NULL,
36 PRIMARY KEY (`inventoryID`), 36 `parentFolderID` char(36) DEFAULT NULL,
37 KEY `owner` (`avatarID`), 37 PRIMARY KEY (`folderID`),
38 KEY `folder` (`parentFolderID`) 38 KEY `inventoryfolders_agentid` (`agentID`),
39) ENGINE=MyISAM DEFAULT CHARSET=utf8; 39 KEY `inventoryfolders_parentFolderid` (`parentFolderID`)
40 40) ENGINE=InnoDB DEFAULT CHARSET=utf8;
41COMMIT;
42
43:VERSION 2 # ------------
44
45BEGIN;
46
47ALTER TABLE inventoryfolders change folderID folderIDold varchar(36);
48ALTER TABLE inventoryfolders change agentID agentIDold varchar(36);
49ALTER TABLE inventoryfolders change parentFolderID parentFolderIDold varchar(36);
50ALTER TABLE inventoryfolders add folderID char(36) not null default '00000000-0000-0000-0000-000000000000';
51ALTER TABLE inventoryfolders add agentID char(36) default NULL;
52ALTER TABLE inventoryfolders add parentFolderID char(36) default NULL;
53UPDATE inventoryfolders set folderID = folderIDold, agentID = agentIDold, parentFolderID = parentFolderIDold;
54ALTER TABLE inventoryfolders drop folderIDold;
55ALTER TABLE inventoryfolders drop agentIDold;
56ALTER TABLE inventoryfolders drop parentFolderIDold;
57ALTER TABLE inventoryfolders add constraint primary key(folderID);
58ALTER TABLE inventoryfolders add index inventoryfolders_agentid(agentID);
59ALTER TABLE inventoryfolders add index inventoryfolders_parentFolderid(parentFolderID);
60
61ALTER TABLE inventoryitems change inventoryID inventoryIDold varchar(36);
62ALTER TABLE inventoryitems change avatarID avatarIDold varchar(36);
63ALTER TABLE inventoryitems change parentFolderID parentFolderIDold varchar(36);
64ALTER TABLE inventoryitems add inventoryID char(36) not null default '00000000-0000-0000-0000-000000000000';
65ALTER TABLE inventoryitems add avatarID char(36) default NULL;
66ALTER TABLE inventoryitems add parentFolderID char(36) default NULL;
67UPDATE inventoryitems set inventoryID = inventoryIDold, avatarID = avatarIDold, parentFolderID = parentFolderIDold;
68ALTER TABLE inventoryitems drop inventoryIDold;
69ALTER TABLE inventoryitems drop avatarIDold;
70ALTER TABLE inventoryitems drop parentFolderIDold;
71ALTER TABLE inventoryitems add constraint primary key(inventoryID);
72ALTER TABLE inventoryitems add index inventoryitems_avatarid(avatarID);
73ALTER TABLE inventoryitems add index inventoryitems_parentFolderid(parentFolderID);
74
75COMMIT;
76
77:VERSION 3 # ------------
78
79BEGIN;
80
81alter table inventoryitems add column inventoryGroupPermissions integer unsigned not null default 0;
82
83COMMIT;
84
85:VERSION 4 # ------------
86
87BEGIN;
88
89update inventoryitems set creatorID = '00000000-0000-0000-0000-000000000000' where creatorID is NULL;
90update inventoryitems set creatorID = '00000000-0000-0000-0000-000000000000' where creatorID = '';
91alter table inventoryitems modify column creatorID varchar(36) not NULL default '00000000-0000-0000-0000-000000000000';
92
93COMMIT;
94
95:VERSION 5 # ------------
96
97BEGIN;
98
99alter table inventoryitems modify column creatorID varchar(128) not NULL default '00000000-0000-0000-0000-000000000000';
100
101COMMIT;
102
103:VERSION 6 # ------------
104
105BEGIN;
106
107alter table inventoryitems modify column creatorID varchar(255) not NULL default '00000000-0000-0000-0000-000000000000';
108 41
109COMMIT; 42COMMIT;