diff --git a/OpenSim/Framework/Data.MySQL/Resources/CreateFoldersTable.sql b/OpenSim/Framework/Data.MySQL/Resources/CreateFoldersTable.sql new file mode 100644 index 0000000000..2bb5553394 --- /dev/null +++ b/OpenSim/Framework/Data.MySQL/Resources/CreateFoldersTable.sql @@ -0,0 +1,11 @@ +CREATE TABLE `inventoryfolders` ( + `folderID` varchar(36) NOT NULL default '', + `agentID` varchar(36) default NULL, + `parentFolderID` varchar(36) default NULL, + `folderName` varchar(64) default NULL, + `type` smallint NOT NULL default 0, + `version` int NOT NULL default 0, + PRIMARY KEY (`folderID`), + KEY `owner` (`agentID`), + KEY `parent` (`parentFolderID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 2'; diff --git a/OpenSim/Framework/Data.MySQL/Resources/CreateItemsTable.sql b/OpenSim/Framework/Data.MySQL/Resources/CreateItemsTable.sql new file mode 100644 index 0000000000..8c79483297 --- /dev/null +++ b/OpenSim/Framework/Data.MySQL/Resources/CreateItemsTable.sql @@ -0,0 +1,18 @@ +CREATE TABLE `inventoryitems` ( + `inventoryID` varchar(36) NOT NULL default '', + `assetID` varchar(36) default NULL, + `assetType` int(11) default NULL, + `parentFolderID` varchar(36) default NULL, + `avatarID` varchar(36) default NULL, + `inventoryName` varchar(64) default NULL, + `inventoryDescription` varchar(64) default NULL, + `inventoryNextPermissions` int(10) unsigned default NULL, + `inventoryCurrentPermissions` int(10) unsigned default NULL, + `invType` int(11) default NULL, + `creatorID` varchar(36) default NULL, + `inventoryBasePermissions` int(10) unsigned NOT NULL default 0, + `inventoryEveryOnePermissions` int(10) unsigned NOT NULL default 0, + PRIMARY KEY (`inventoryID`), + KEY `owner` (`avatarID`), + KEY `folder` (`parentFolderID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 2'; diff --git a/OpenSim/Framework/Data.MySQL/Resources/UpgradeFoldersTableToVersion2.sql b/OpenSim/Framework/Data.MySQL/Resources/UpgradeFoldersTableToVersion2.sql new file mode 100644 index 0000000000..813c7c4285 --- /dev/null +++ b/OpenSim/Framework/Data.MySQL/Resources/UpgradeFoldersTableToVersion2.sql @@ -0,0 +1,4 @@ +ALTER TABLE `inventoryfolders` + ADD COLUMN `type` smallint NOT NULL default 0, + ADD COLUMN `version` int NOT NULL default 0, +COMMENT='Rev. 2'; diff --git a/OpenSim/Framework/Data.MySQL/Resources/UpgradeItemsTableToVersion2.sql b/OpenSim/Framework/Data.MySQL/Resources/UpgradeItemsTableToVersion2.sql new file mode 100644 index 0000000000..c47786ca09 --- /dev/null +++ b/OpenSim/Framework/Data.MySQL/Resources/UpgradeItemsTableToVersion2.sql @@ -0,0 +1,9 @@ +ALTER TABLE `inventoryitems` + CHANGE COLUMN `type` `assetType` int(11) default NULL, + ADD COLUMN `invType` int(11) default NULL, + ADD COLUMN `creatorID` varchar(36) default NULL, + ADD COLUMN `inventoryBasePermissions` int(10) unsigned NOT NULL default 0, + ADD COLUMN `inventoryEveryOnePermissions` int(10) unsigned NOT NULL default 0, +COMMENT='Rev. 2'; + +UPDATE `inventoryitems` SET invType=assetType;