Compare commits

...

38 Commits

Author SHA1 Message Date
Diva Canto eb988d72bc New config var: DisableObjectTransfer. If set to True, objects never cross; instead they stay in the region, possibly placed outside its borders. 2016-07-03 12:17:19 -07:00
Diva Canto 00efc288d1 Don't copy assets to foreign asset servers when the objects are being deleted 2016-06-05 16:43:28 -07:00
Kevin Cozens 48b6d7ad27 Correct case in the names of the Avatar and Friends tables 2016-05-15 10:05:57 -07:00
Diva Canto 28e35420ea MySQL migrations: fix one last migration that had been left behind
Conflicts:
	OpenSim/Data/MySQL/Resources/UserAccount.migrations
2016-04-12 11:12:36 -07:00
Melanie Thielker ea7b316c4b Correct the case of the Presence table 2016-04-12 10:59:34 -07:00
Melanie Thielker 0bae05ff46 Change casing on UserAccounts 2016-04-12 10:59:22 -07:00
Diva Canto cbf5dfc16f The old sqlite inventory data interface was still around and causing problems: the only part of the code using it was the data (sqlite) tests. Given that this old interface has been obsolete for several years, it has now been removed, including the tests. TODO: Writing tests for the new (ah!) inventory data interface. 2016-02-21 10:43:40 -08:00
Diva Canto 928706b207 SQLite: Removed obsolete migration file 2016-02-21 09:11:06 -08:00
Diva Canto e726fa11f3 Flatten migrations for sqlite 2016-02-21 09:00:59 -08:00
Diva Canto 736343bee9 Flatten migrations for MySQL. 2016-02-20 19:08:02 -08:00
Diva Canto 363d7054ea The configger tool hadn't been updated since the introduction of OpenSimDefaults! :0
It is updated now.
2015-12-24 10:10:15 -08:00
Diva Canto 997cafb556 Flipped flavour to Post_Fixes 2015-12-24 10:09:56 -08:00
Diva Canto 497f575b9b Flipped flavour to Release 2015-12-09 11:14:28 -08:00
UbitUmarov 0a122c9b40 try to suport physics wearable type, sending it only if outgoing protocol version >= 0.5 2015-12-01 19:12:16 +00:00
UbitUmarov 46cd2da82c clamp maximum wearables types to Max suported by region (physics type still not supported) 2015-12-01 16:34:38 +00:00
Melanie Thielker dc46089054 Change versions 2015-12-01 15:59:21 +01:00
Melanie Thielker 22cf03ea0b Revert "downgrade protocol max to 0.3 since variable wearable types is still not supported"
This reverts commit 8c75625e85.
2015-12-01 15:55:42 +01:00
Diva Canto 13bdd25cfd Replaced ICSharpCode.SharpZipLib.dll for the same reason 2015-11-30 20:20:02 -08:00
Diva Canto a2ae17ad33 Replaced the mono addins dlls with freshly compiled ones, because the existing ones may somehow been mutually inconsistent. 2015-11-30 20:19:48 -08:00
UbitUmarov 8c75625e85 downgrade protocol max to 0.3 since variable wearable types is still not supported 2015-11-30 01:50:56 +00:00
Diva Canto f3829c10e0 Sometimes the viewer sends a null string as mapName; this made the client thread throw an exception with unexpected behavior for users (nothing happens). This commit gives it a sane default: it assumes we're looking for a position in the current region. 2015-11-27 08:29:19 -08:00
Diva Canto 4251fdf120 Commented out annoying debug messages. They are already commented in the master branch. 2015-11-27 08:28:30 -08:00
Diva Canto 9074c3d6f6 ok, now let's really flip it
Revert "Not yet"

This reverts commit de7f31abd1.
2015-11-24 14:02:17 -08:00
Diva Canto de7f31abd1 Not yet
Revert "Flip flavour to post-fixes"

This reverts commit 2e7c2ee998.
2015-11-24 13:51:55 -08:00
Diva Canto 2e7c2ee998 Flip flavour to post-fixes 2015-11-24 13:40:57 -08:00
Shy Robbiani e4e31d9acf row format fixed removed to allow creation of regions table
row_format=fixed is not supported by innodb and has broken the creation
of the regions table during the first startup of ROBUST. It must be a
relict from MyISAM. Also removed the probably inappropriate table
comment.

Signed-off-by: Kevin Cozens <kevin@ve3syb.ca>
2015-11-21 20:08:20 -05:00
Diva Canto 7c1f6ba913 Flip flavour to release. 2015-11-15 19:37:24 -08:00
Diva Canto f980355da4 Merge branch 'master' into 0.8.2-post-fixes 2015-11-12 18:52:56 -08:00
Diva Canto be744b68b4 Flipped flavour to RC2 2015-11-10 20:38:41 -08:00
Diva Canto 465abf01c0 Merge branch 'master' into 0.8.2-post-fixes
Conflicts:
	OpenSim/Framework/VersionInfo.cs
	OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
	OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
2015-11-10 20:34:18 -08:00
Diva Canto 8a96d42e97 Don't crash the sim if the map image is null. 2015-11-01 11:36:11 -08:00
UbitUmarov 84c8a7ae53 set SOG.IsAttachment when doing a full check, so future gets see the right value 2015-10-25 20:43:35 -07:00
Diva Canto 36af6a3baa Removed invalid dependencies from prebuild (those dlls no longer exist) 2015-10-22 21:44:54 -07:00
Diva Canto 2c729a1a63 Mark XAssetService obsolete and warn users. 2015-10-21 19:23:26 -07:00
Diva Canto 426bbb63dd Fix an issue introduced in 70a46fe090. I accidentally deleted the entire [EntityTransfer] section instead of just a few variables in it. 2015-10-21 16:52:08 -07:00
Melanie Thielker 4fd48ae8b3 Let the initiator of a teleport or crossing know that we handle extra
wearables
2015-10-20 01:00:18 +02:00
Diva Canto a7f42ea8f1 Added warning in RegionCombinerModule about it being considered obsolete and encouraging people to switch to varregions. 2015-10-18 17:01:28 -07:00
Diva Canto 36573b4568 Flipped flavour to RC1. 2015-10-18 16:30:33 -07:00
42 changed files with 723 additions and 3232 deletions

View File

@ -1,81 +1,21 @@
# -----------------
:VERSION 1
:VERSION 10
BEGIN;
CREATE TABLE `assets` (
`id` binary(16) NOT NULL,
CREATE TABLE IF NOT EXISTS `assets` (
`name` varchar(64) NOT NULL,
`description` varchar(64) NOT NULL,
`assetType` tinyint(4) NOT NULL,
`invType` tinyint(4) NOT NULL,
`local` tinyint(1) NOT NULL,
`temporary` tinyint(1) NOT NULL,
`data` longblob NOT NULL,
`id` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
`create_time` int(11) DEFAULT '0',
`access_time` int(11) DEFAULT '0',
`asset_flags` int(11) NOT NULL DEFAULT '0',
`CreatorID` varchar(128) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
COMMIT;
# -----------------
:VERSION 2
BEGIN;
ALTER TABLE assets change id oldid binary(16);
ALTER TABLE assets add id varchar(36) not null default '';
UPDATE assets set id = concat(substr(hex(oldid),1,8),"-",substr(hex(oldid),9,4),"-",substr(hex(oldid),13,4),"-",substr(hex(oldid),17,4),"-",substr(hex(oldid),21,12));
ALTER TABLE assets drop oldid;
ALTER TABLE assets add constraint primary key(id);
COMMIT;
# -----------------
:VERSION 3
BEGIN;
ALTER TABLE assets change id oldid varchar(36);
ALTER TABLE assets add id char(36) not null default '00000000-0000-0000-0000-000000000000';
UPDATE assets set id = oldid;
ALTER TABLE assets drop oldid;
ALTER TABLE assets add constraint primary key(id);
COMMIT;
# -----------------
:VERSION 4
BEGIN;
ALTER TABLE assets drop InvType;
COMMIT;
# -----------------
:VERSION 5
BEGIN;
ALTER TABLE assets add create_time integer default 0;
ALTER TABLE assets add access_time integer default 0;
COMMIT;
# -----------------
:VERSION 6
DELETE FROM assets WHERE id = 'dc4b9f0b-d008-45c6-96a4-01dd947ac621'
:VERSION 7
ALTER TABLE assets ADD COLUMN asset_flags INTEGER NOT NULL DEFAULT 0;
:VERSION 8
ALTER TABLE assets ADD COLUMN CreatorID varchar(128) NOT NULL DEFAULT '';
:VERSION 9
BEGIN;
COMMIT;

View File

@ -1,16 +1,17 @@
:VERSION 1 # -------------------------------
:VERSION 4 # -------------------------------
begin;
CREATE TABLE `auth` (
CREATE TABLE IF NOT EXISTS `auth` (
`UUID` char(36) NOT NULL,
`passwordHash` char(32) NOT NULL default '',
`passwordSalt` char(32) NOT NULL default '',
`webLoginKey` varchar(255) NOT NULL default '',
PRIMARY KEY (`UUID`)
) ENGINE=InnoDB;
`passwordHash` char(32) NOT NULL DEFAULT '',
`passwordSalt` char(32) NOT NULL DEFAULT '',
`webLoginKey` varchar(255) NOT NULL DEFAULT '',
`accountType` varchar(32) NOT NULL DEFAULT 'UserAccount',
PRIMARY KEY (`UUID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `tokens` (
CREATE TABLE IF NOT EXISTS `tokens` (
`UUID` char(36) NOT NULL,
`token` varchar(255) NOT NULL,
`validity` datetime NOT NULL,
@ -18,22 +19,6 @@ CREATE TABLE `tokens` (
KEY `UUID` (`UUID`),
KEY `token` (`token`),
KEY `validity` (`validity`)
) ENGINE=InnoDB;
commit;
:VERSION 2 # -------------------------------
BEGIN;
INSERT INTO auth (UUID, passwordHash, passwordSalt, webLoginKey) SELECT `UUID` AS UUID, `passwordHash` AS passwordHash, `passwordSalt` AS passwordSalt, `webLoginKey` AS webLoginKey FROM users;
COMMIT;
:VERSION 3 # -------------------------------
BEGIN;
ALTER TABLE `auth` ADD COLUMN `accountType` VARCHAR(32) NOT NULL DEFAULT 'UserAccount';
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
COMMIT;

View File

@ -1,20 +1,13 @@
:VERSION 1
:VERSION 3
BEGIN;
CREATE TABLE Avatars (
PrincipalID CHAR(36) NOT NULL,
Name VARCHAR(32) NOT NULL,
Value VARCHAR(255) NOT NULL DEFAULT '',
PRIMARY KEY(PrincipalID, Name),
KEY(PrincipalID));
COMMIT;
:VERSION 2
BEGIN;
alter table Avatars change column Value Value text;
CREATE TABLE IF NOT EXISTS `Avatars` (
`PrincipalID` char(36) NOT NULL,
`Name` varchar(32) NOT NULL,
`Value` text,
PRIMARY KEY (`PrincipalID`,`Name`),
KEY `PrincipalID` (`PrincipalID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
COMMIT;

View File

@ -1,41 +1,29 @@
:VERSION 13
# The estate migrations used to be in Region store
# here they will do nothing (bad) if the tables are already there,
# just update the store version.
:VERSION 34
BEGIN;
CREATE TABLE IF NOT EXISTS `estate_managers` (
`EstateID` int(10) unsigned NOT NULL,
`uuid` char(36) NOT NULL,
KEY `EstateID` (`EstateID`)
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS `estate_groups` (
`EstateID` int(10) unsigned NOT NULL,
`uuid` char(36) NOT NULL,
KEY `EstateID` (`EstateID`)
) ENGINE=InnoDB;
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `estate_users` (
CREATE TABLE IF NOT EXISTS `estate_managers` (
`EstateID` int(10) unsigned NOT NULL,
`uuid` char(36) NOT NULL,
KEY `EstateID` (`EstateID`)
) ENGINE=InnoDB;
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `estateban` (
`EstateID` int(10) unsigned NOT NULL,
`bannedUUID` varchar(36) NOT NULL,
`bannedIp` varchar(16) NOT NULL,
`bannedIpHostMask` varchar(16) NOT NULL,
`bannedNameMask` varchar(64) default NULL,
KEY `estateban_EstateID` (`EstateID`)
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS `estate_map` (
`RegionID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
`EstateID` int(11) NOT NULL,
PRIMARY KEY (`RegionID`),
KEY `EstateID` (`EstateID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `estate_settings` (
`EstateID` int(10) unsigned NOT NULL auto_increment,
`EstateName` varchar(64) default NULL,
`EstateID` int(10) unsigned NOT NULL AUTO_INCREMENT,
`EstateName` varchar(64) DEFAULT NULL,
`AbuseEmailToEstateOwner` tinyint(4) NOT NULL,
`DenyAnonymous` tinyint(4) NOT NULL,
`ResetHomeOnTeleport` tinyint(4) NOT NULL,
@ -55,33 +43,29 @@ CREATE TABLE IF NOT EXISTS `estate_settings` (
`EstateSkipScripts` tinyint(4) NOT NULL,
`BillableFactor` float NOT NULL,
`PublicAccess` tinyint(4) NOT NULL,
`AbuseEmail` varchar(255) not null,
`EstateOwner` varchar(36) not null,
`DenyMinors` tinyint not null,
PRIMARY KEY (`EstateID`)
) ENGINE=InnoDB AUTO_INCREMENT=100;
`AbuseEmail` varchar(255) NOT NULL,
`EstateOwner` varchar(36) NOT NULL,
`DenyMinors` tinyint(4) NOT NULL,
`AllowLandmark` tinyint(4) NOT NULL DEFAULT '1',
`AllowParcelChanges` tinyint(4) NOT NULL DEFAULT '1',
`AllowSetHome` tinyint(4) NOT NULL DEFAULT '1',
PRIMARY KEY (`EstateID`)
) ENGINE=InnoDB AUTO_INCREMENT=101 DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `estate_map` (
`RegionID` char(36) NOT NULL default '00000000-0000-0000-0000-000000000000',
`EstateID` int(11) NOT NULL,
PRIMARY KEY (`RegionID`),
CREATE TABLE IF NOT EXISTS `estate_users` (
`EstateID` int(10) unsigned NOT NULL,
`uuid` char(36) NOT NULL,
KEY `EstateID` (`EstateID`)
) ENGINE=InnoDB;
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `estateban` (
`EstateID` int(10) unsigned NOT NULL,
`bannedUUID` varchar(36) NOT NULL,
`bannedIp` varchar(16) NOT NULL,
`bannedIpHostMask` varchar(16) NOT NULL,
`bannedNameMask` varchar(64) DEFAULT NULL,
KEY `estateban_EstateID` (`EstateID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
COMMIT;
:VERSION 32 #--------------------- (moved from RegionStore migr, just in case)
BEGIN;
ALTER TABLE estate_settings AUTO_INCREMENT = 100;
COMMIT;
:VERSION 33 #---------------------
BEGIN;
ALTER TABLE estate_settings ADD COLUMN `AllowLandmark` tinyint(4) NOT NULL default '1';
ALTER TABLE estate_settings ADD COLUMN `AllowParcelChanges` tinyint(4) NOT NULL default '1';
ALTER TABLE estate_settings ADD COLUMN `AllowSetHome` tinyint(4) NOT NULL default '1';
COMMIT;

View File

@ -1,32 +1,14 @@
:VERSION 1 # -------------------------
:VERSION 4 # -------------------------
BEGIN;
CREATE TABLE `Friends` (
`PrincipalID` CHAR(36) NOT NULL,
`Friend` VARCHAR(255) NOT NULL,
`Flags` VARCHAR(16) NOT NULL DEFAULT 0,
`Offered` VARCHAR(32) NOT NULL DEFAULT 0,
PRIMARY KEY(`PrincipalID`, `Friend`),
KEY(`PrincipalID`)
) ENGINE=InnoDB;
COMMIT;
:VERSION 2 # -------------------------
BEGIN;
INSERT INTO `Friends` SELECT `ownerID`, `friendID`, `friendPerms`, 0 FROM `userfriends`;
COMMIT;
:VERSION 3 # -------------------------
BEGIN;
ALTER TABLE `Friends` MODIFY COLUMN PrincipalID varchar(255) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
ALTER TABLE `Friends` DROP PRIMARY KEY;
ALTER TABLE `Friends` ADD PRIMARY KEY(PrincipalID(36), Friend(36));
CREATE TABLE IF NOT EXISTS `Friends` (
`PrincipalID` varchar(255) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
`Friend` varchar(255) NOT NULL,
`Flags` varchar(16) NOT NULL DEFAULT '0',
`Offered` varchar(32) NOT NULL DEFAULT '0',
PRIMARY KEY (`PrincipalID`(36),`Friend`(36)),
KEY `PrincipalID` (`PrincipalID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
COMMIT;

View File

@ -1,105 +1,52 @@
:VERSION 1
:VERSION 10
CREATE TABLE `regions` (
BEGIN;
CREATE TABLE IF NOT EXISTS `regions` (
`uuid` varchar(36) NOT NULL,
`regionHandle` bigint(20) unsigned NOT NULL,
`regionName` varchar(32) default NULL,
`regionRecvKey` varchar(128) default NULL,
`regionSendKey` varchar(128) default NULL,
`regionSecret` varchar(128) default NULL,
`regionDataURI` varchar(255) default NULL,
`serverIP` varchar(64) default NULL,
`serverPort` int(10) unsigned default NULL,
`serverURI` varchar(255) default NULL,
`locX` int(10) unsigned default NULL,
`locY` int(10) unsigned default NULL,
`locZ` int(10) unsigned default NULL,
`eastOverrideHandle` bigint(20) unsigned default NULL,
`westOverrideHandle` bigint(20) unsigned default NULL,
`southOverrideHandle` bigint(20) unsigned default NULL,
`northOverrideHandle` bigint(20) unsigned default NULL,
`regionAssetURI` varchar(255) default NULL,
`regionAssetRecvKey` varchar(128) default NULL,
`regionAssetSendKey` varchar(128) default NULL,
`regionUserURI` varchar(255) default NULL,
`regionUserRecvKey` varchar(128) default NULL,
`regionUserSendKey` varchar(128) default NULL, `regionMapTexture` varchar(36) default NULL,
`serverHttpPort` int(10) default NULL, `serverRemotingPort` int(10) default NULL,
`owner_uuid` varchar(36) default '00000000-0000-0000-0000-000000000000' not null,
`originUUID` varchar(36),
PRIMARY KEY (`uuid`),
`regionName` varchar(128) DEFAULT NULL,
`regionRecvKey` varchar(128) DEFAULT NULL,
`regionSendKey` varchar(128) DEFAULT NULL,
`regionSecret` varchar(128) DEFAULT NULL,
`regionDataURI` varchar(255) DEFAULT NULL,
`serverIP` varchar(64) DEFAULT NULL,
`serverPort` int(10) unsigned DEFAULT NULL,
`serverURI` varchar(255) DEFAULT NULL,
`locX` int(10) unsigned DEFAULT NULL,
`locY` int(10) unsigned DEFAULT NULL,
`locZ` int(10) unsigned DEFAULT NULL,
`eastOverrideHandle` bigint(20) unsigned DEFAULT NULL,
`westOverrideHandle` bigint(20) unsigned DEFAULT NULL,
`southOverrideHandle` bigint(20) unsigned DEFAULT NULL,
`northOverrideHandle` bigint(20) unsigned DEFAULT NULL,
`regionAssetURI` varchar(255) DEFAULT NULL,
`regionAssetRecvKey` varchar(128) DEFAULT NULL,
`regionAssetSendKey` varchar(128) DEFAULT NULL,
`regionUserURI` varchar(255) DEFAULT NULL,
`regionUserRecvKey` varchar(128) DEFAULT NULL,
`regionUserSendKey` varchar(128) DEFAULT NULL,
`regionMapTexture` varchar(36) DEFAULT NULL,
`serverHttpPort` int(10) DEFAULT NULL,
`serverRemotingPort` int(10) DEFAULT NULL,
`owner_uuid` varchar(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
`originUUID` varchar(36) DEFAULT NULL,
`access` int(10) unsigned DEFAULT '1',
`ScopeID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
`sizeX` int(11) NOT NULL DEFAULT '0',
`sizeY` int(11) NOT NULL DEFAULT '0',
`flags` int(11) NOT NULL DEFAULT '0',
`last_seen` int(11) NOT NULL DEFAULT '0',
`PrincipalID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
`Token` varchar(255) NOT NULL,
`parcelMapTexture` varchar(36) DEFAULT NULL,
PRIMARY KEY (`uuid`),
KEY `regionName` (`regionName`),
KEY `regionHandle` (`regionHandle`),
KEY `overrideHandles` (`eastOverrideHandle`,`westOverrideHandle`,`southOverrideHandle`,`northOverrideHandle`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Rev. 3';
:VERSION 2
BEGIN;
ALTER TABLE regions add column access integer unsigned default 1;
COMMIT;
:VERSION 3
BEGIN;
ALTER TABLE regions add column ScopeID char(36) not null default '00000000-0000-0000-0000-000000000000';
create index ScopeID on regions(ScopeID);
COMMIT;
:VERSION 4
BEGIN;
ALTER TABLE regions add column sizeX integer not null default 0;
ALTER TABLE regions add column sizeY integer not null default 0;
COMMIT;
:VERSION 5
BEGIN;
ALTER TABLE `regions` ADD COLUMN `flags` integer NOT NULL DEFAULT 0;
CREATE INDEX flags ON regions(flags);
COMMIT;
:VERSION 6
BEGIN;
ALTER TABLE `regions` ADD COLUMN `last_seen` integer NOT NULL DEFAULT 0;
COMMIT;
:VERSION 7
BEGIN;
ALTER TABLE `regions` ADD COLUMN `PrincipalID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
ALTER TABLE `regions` ADD COLUMN `Token` varchar(255) NOT NULL;
COMMIT;
:VERSION 8 # ------------
BEGIN;
alter table regions modify column regionName varchar(128) default NULL;
COMMIT;
:VERSION 9 # ------------
BEGIN;
alter table regions add column `parcelMapTexture` varchar(36) default NULL;
KEY `overrideHandles` (`eastOverrideHandle`,`westOverrideHandle`,`southOverrideHandle`,`northOverrideHandle`),
KEY `ScopeID` (`ScopeID`),
KEY `flags` (`flags`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
COMMIT;

View File

@ -1,42 +1,16 @@
:VERSION 1 # --------------------------
:VERSION 5 # --------------------------
BEGIN;
CREATE TABLE `im_offline` (
`ID` MEDIUMINT NOT NULL AUTO_INCREMENT,
`PrincipalID` char(36) NOT NULL default '',
CREATE TABLE IF NOT EXISTS `im_offline` (
`ID` mediumint(9) NOT NULL AUTO_INCREMENT,
`PrincipalID` char(36) NOT NULL DEFAULT '',
`FromID` char(36) NOT NULL DEFAULT '',
`Message` text NOT NULL,
`TMStamp` timestamp NOT NULL,
PRIMARY KEY (`ID`),
KEY `PrincipalID` (`PrincipalID`)
) ENGINE=MyISAM;
COMMIT;
:VERSION 2 # --------------------------
BEGIN;
INSERT INTO `im_offline` SELECT * from `diva_im_offline`;
DROP TABLE `diva_im_offline`;
DELETE FROM `migrations` WHERE name='diva_im_Store';
COMMIT;
:VERSION 3 # --------------------------
BEGIN;
ALTER TABLE `im_offline`
ADD `FromID` char(36) NOT NULL default '' AFTER `PrincipalID`,
ADD KEY `FromID` (`FromID`);
COMMIT;
:VERSION 4 # --------------------------
BEGIN;
ALTER TABLE im_offline CONVERT TO CHARACTER SET utf8;
`TMStamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`ID`),
KEY `PrincipalID` (`PrincipalID`),
KEY `FromID` (`FromID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
COMMIT;

View File

@ -1,109 +1,42 @@
:VERSION 1 # ------------
:VERSION 7 # ------------
BEGIN;
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`)
CREATE TABLE IF NOT EXISTS `inventoryitems` (
`assetID` varchar(36) DEFAULT NULL,
`assetType` int(11) DEFAULT NULL,
`inventoryName` varchar(64) DEFAULT NULL,
`inventoryDescription` varchar(128) DEFAULT NULL,
`inventoryNextPermissions` int(10) unsigned DEFAULT NULL,
`inventoryCurrentPermissions` int(10) unsigned DEFAULT NULL,
`invType` int(11) DEFAULT NULL,
`creatorID` varchar(255) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
`inventoryBasePermissions` int(10) unsigned NOT NULL DEFAULT '0',
`inventoryEveryOnePermissions` int(10) unsigned NOT NULL DEFAULT '0',
`salePrice` int(11) NOT NULL DEFAULT '0',
`saleType` tinyint(4) NOT NULL DEFAULT '0',
`creationDate` int(11) NOT NULL DEFAULT '0',
`groupID` varchar(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
`groupOwned` tinyint(4) NOT NULL DEFAULT '0',
`flags` int(11) unsigned NOT NULL DEFAULT '0',
`inventoryID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
`avatarID` char(36) DEFAULT NULL,
`parentFolderID` char(36) DEFAULT NULL,
`inventoryGroupPermissions` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`inventoryID`),
KEY `inventoryitems_avatarid` (`avatarID`),
KEY `inventoryitems_parentFolderid` (`parentFolderID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
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(128) 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,
`salePrice` int(11) NOT NULL default 0,
`saleType` tinyint(4) NOT NULL default 0,
`creationDate` int(11) NOT NULL default 0,
`groupID` varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000',
`groupOwned` tinyint(4) NOT NULL default 0,
`flags` int(11) unsigned NOT NULL default 0,
PRIMARY KEY (`inventoryID`),
KEY `owner` (`avatarID`),
KEY `folder` (`parentFolderID`)
CREATE TABLE IF NOT EXISTS `inventoryfolders` (
`folderName` varchar(64) DEFAULT NULL,
`type` smallint(6) NOT NULL DEFAULT '0',
`version` int(11) NOT NULL DEFAULT '0',
`folderID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
`agentID` char(36) DEFAULT NULL,
`parentFolderID` char(36) DEFAULT NULL,
PRIMARY KEY (`folderID`),
KEY `inventoryfolders_agentid` (`agentID`),
KEY `inventoryfolders_parentFolderid` (`parentFolderID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
COMMIT;
:VERSION 2 # ------------
BEGIN;
ALTER TABLE inventoryfolders change folderID folderIDold varchar(36);
ALTER TABLE inventoryfolders change agentID agentIDold varchar(36);
ALTER TABLE inventoryfolders change parentFolderID parentFolderIDold varchar(36);
ALTER TABLE inventoryfolders add folderID char(36) not null default '00000000-0000-0000-0000-000000000000';
ALTER TABLE inventoryfolders add agentID char(36) default NULL;
ALTER TABLE inventoryfolders add parentFolderID char(36) default NULL;
UPDATE inventoryfolders set folderID = folderIDold, agentID = agentIDold, parentFolderID = parentFolderIDold;
ALTER TABLE inventoryfolders drop folderIDold;
ALTER TABLE inventoryfolders drop agentIDold;
ALTER TABLE inventoryfolders drop parentFolderIDold;
ALTER TABLE inventoryfolders add constraint primary key(folderID);
ALTER TABLE inventoryfolders add index inventoryfolders_agentid(agentID);
ALTER TABLE inventoryfolders add index inventoryfolders_parentFolderid(parentFolderID);
ALTER TABLE inventoryitems change inventoryID inventoryIDold varchar(36);
ALTER TABLE inventoryitems change avatarID avatarIDold varchar(36);
ALTER TABLE inventoryitems change parentFolderID parentFolderIDold varchar(36);
ALTER TABLE inventoryitems add inventoryID char(36) not null default '00000000-0000-0000-0000-000000000000';
ALTER TABLE inventoryitems add avatarID char(36) default NULL;
ALTER TABLE inventoryitems add parentFolderID char(36) default NULL;
UPDATE inventoryitems set inventoryID = inventoryIDold, avatarID = avatarIDold, parentFolderID = parentFolderIDold;
ALTER TABLE inventoryitems drop inventoryIDold;
ALTER TABLE inventoryitems drop avatarIDold;
ALTER TABLE inventoryitems drop parentFolderIDold;
ALTER TABLE inventoryitems add constraint primary key(inventoryID);
ALTER TABLE inventoryitems add index inventoryitems_avatarid(avatarID);
ALTER TABLE inventoryitems add index inventoryitems_parentFolderid(parentFolderID);
COMMIT;
:VERSION 3 # ------------
BEGIN;
alter table inventoryitems add column inventoryGroupPermissions integer unsigned not null default 0;
COMMIT;
:VERSION 4 # ------------
BEGIN;
update inventoryitems set creatorID = '00000000-0000-0000-0000-000000000000' where creatorID is NULL;
update inventoryitems set creatorID = '00000000-0000-0000-0000-000000000000' where creatorID = '';
alter table inventoryitems modify column creatorID varchar(36) not NULL default '00000000-0000-0000-0000-000000000000';
COMMIT;
:VERSION 5 # ------------
BEGIN;
alter table inventoryitems modify column creatorID varchar(128) not NULL default '00000000-0000-0000-0000-000000000000';
COMMIT;
:VERSION 6 # ------------
BEGIN;
alter table inventoryitems modify column creatorID varchar(255) not NULL default '00000000-0000-0000-0000-000000000000';
COMMIT;

View File

@ -1,31 +1,16 @@
:VERSION 1 # --------------------------
:VERSION 4 # --------------------------
BEGIN;
CREATE TABLE `Presence` (
`UserID` VARCHAR(255) NOT NULL,
`RegionID` CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
`SessionID` CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
`SecureSessionID` CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000'
) ENGINE=InnoDB;
CREATE UNIQUE INDEX SessionID ON Presence(SessionID);
CREATE INDEX UserID ON Presence(UserID);
COMMIT;
:VERSION 2 # --------------------------
BEGIN;
ALTER TABLE `Presence` ADD COLUMN LastSeen timestamp;
COMMIT;
:VERSION 3 # --------------------------
BEGIN;
CREATE INDEX RegionID ON Presence(RegionID);
CREATE TABLE IF NOT EXISTS `Presence` (
`UserID` varchar(255) NOT NULL,
`RegionID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
`SessionID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
`SecureSessionID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
`LastSeen` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
UNIQUE KEY `SessionID` (`SessionID`),
KEY `UserID` (`UserID`),
KEY `RegionID` (`RegionID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
COMMIT;

File diff suppressed because it is too large Load Diff

View File

@ -1,47 +1,31 @@
:VERSION 1 # -------------------------
:VERSION 5 # -------------------------
BEGIN;
CREATE TABLE `UserAccounts` (
`PrincipalID` CHAR(36) NOT NULL,
`ScopeID` CHAR(36) NOT NULL,
`FirstName` VARCHAR(64) NOT NULL,
`LastName` VARCHAR(64) NOT NULL,
`Email` VARCHAR(64),
`ServiceURLs` TEXT,
`Created` INT(11)
CREATE TABLE IF NOT EXISTS `UserAccounts` (
`PrincipalID` char(36) NOT NULL,
`ScopeID` char(36) NOT NULL,
`FirstName` varchar(64) NOT NULL,
`LastName` varchar(64) NOT NULL,
`Email` varchar(64) DEFAULT NULL,
`ServiceURLs` text,
`Created` int(11) DEFAULT NULL,
`UserLevel` int(11) NOT NULL DEFAULT '0',
`UserFlags` int(11) NOT NULL DEFAULT '0',
`UserTitle` varchar(64) NOT NULL DEFAULT '',
UNIQUE KEY `PrincipalID` (`PrincipalID`),
KEY `Email` (`Email`),
KEY `FirstName` (`FirstName`),
KEY `LastName` (`LastName`),
KEY `Name` (`FirstName`,`LastName`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
COMMIT;
:VERSION 2 # -------------------------
:VERSION 6 # -------------------------
BEGIN;
INSERT INTO UserAccounts (PrincipalID, ScopeID, FirstName, LastName, Email, ServiceURLs, Created) SELECT `UUID` AS PrincipalID, '00000000-0000-0000-0000-000000000000' AS ScopeID, username AS FirstName, lastname AS LastName, email as Email, CONCAT('AssetServerURI=', userAssetURI, ' InventoryServerURI=', userInventoryURI, ' GatewayURI= HomeURI=') AS ServiceURLs, created as Created FROM users;
ALTER TABLE `UserAccounts` ADD `active` INT NOT NULL DEFAULT '1';
COMMIT;
:VERSION 3 # -------------------------
BEGIN;
CREATE UNIQUE INDEX PrincipalID ON UserAccounts(PrincipalID);
CREATE INDEX Email ON UserAccounts(Email);
CREATE INDEX FirstName ON UserAccounts(FirstName);
CREATE INDEX LastName ON UserAccounts(LastName);
CREATE INDEX Name ON UserAccounts(FirstName,LastName);
COMMIT;
:VERSION 4 # -------------------------
BEGIN;
ALTER TABLE UserAccounts ADD COLUMN UserLevel integer NOT NULL DEFAULT 0;
ALTER TABLE UserAccounts ADD COLUMN UserFlags integer NOT NULL DEFAULT 0;
ALTER TABLE UserAccounts ADD COLUMN UserTitle varchar(64) NOT NULL DEFAULT '';
COMMIT;

View File

@ -1,4 +1,4 @@
:VERSION 1 # -------------------------------
:VERSION 5 # -------------------------------
begin;
@ -44,6 +44,7 @@ CREATE TABLE IF NOT EXISTS `userpicks` (
`posglobal` varchar(255) NOT NULL,
`sortorder` int(2) NOT NULL,
`enabled` enum('true','false') NOT NULL,
`gatekeeper` varchar(255),
PRIMARY KEY (`pickuuid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
@ -66,11 +67,6 @@ CREATE TABLE IF NOT EXISTS `userprofile` (
PRIMARY KEY (`useruuid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
commit;
:VERSION 2 # -------------------------------
begin;
CREATE TABLE IF NOT EXISTS `userdata` (
`UserId` char(36) NOT NULL,
`TagId` varchar(64) NOT NULL,
@ -79,10 +75,6 @@ CREATE TABLE IF NOT EXISTS `userdata` (
PRIMARY KEY (`UserId`,`TagId`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
commit;
:VERSION 3 # -------------------------------
begin;
CREATE TABLE IF NOT EXISTS `usersettings` (
`useruuid` varchar(36) NOT NULL,
`imviaemail` enum('true','false') NOT NULL,
@ -90,9 +82,5 @@ CREATE TABLE IF NOT EXISTS `usersettings` (
`email` varchar(254) NOT NULL,
PRIMARY KEY (`useruuid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
commit;
:VERSION 4 # -------------------------------
begin;
ALTER TABLE userpicks ADD COLUMN gatekeeper varchar(255);
commit;

View File

@ -1,168 +0,0 @@
:VERSION 1 # -----------------------------
BEGIN;
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for agents
-- ----------------------------
CREATE TABLE `agents` (
`UUID` varchar(36) NOT NULL,
`sessionID` varchar(36) NOT NULL,
`secureSessionID` varchar(36) NOT NULL,
`agentIP` varchar(16) NOT NULL,
`agentPort` int(11) NOT NULL,
`agentOnline` tinyint(4) NOT NULL,
`loginTime` int(11) NOT NULL,
`logoutTime` int(11) NOT NULL,
`currentRegion` varchar(36) NOT NULL,
`currentHandle` bigint(20) unsigned NOT NULL,
`currentPos` varchar(64) NOT NULL,
PRIMARY KEY (`UUID`),
UNIQUE KEY `session` (`sessionID`),
UNIQUE KEY `ssession` (`secureSessionID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Create schema avatar_appearance
--
CREATE TABLE `avatarappearance` (
Owner char(36) NOT NULL,
Serial int(10) unsigned NOT NULL,
Visual_Params blob NOT NULL,
Texture blob NOT NULL,
Avatar_Height float NOT NULL,
Body_Item char(36) NOT NULL,
Body_Asset char(36) NOT NULL,
Skin_Item char(36) NOT NULL,
Skin_Asset char(36) NOT NULL,
Hair_Item char(36) NOT NULL,
Hair_Asset char(36) NOT NULL,
Eyes_Item char(36) NOT NULL,
Eyes_Asset char(36) NOT NULL,
Shirt_Item char(36) NOT NULL,
Shirt_Asset char(36) NOT NULL,
Pants_Item char(36) NOT NULL,
Pants_Asset char(36) NOT NULL,
Shoes_Item char(36) NOT NULL,
Shoes_Asset char(36) NOT NULL,
Socks_Item char(36) NOT NULL,
Socks_Asset char(36) NOT NULL,
Jacket_Item char(36) NOT NULL,
Jacket_Asset char(36) NOT NULL,
Gloves_Item char(36) NOT NULL,
Gloves_Asset char(36) NOT NULL,
Undershirt_Item char(36) NOT NULL,
Undershirt_Asset char(36) NOT NULL,
Underpants_Item char(36) NOT NULL,
Underpants_Asset char(36) NOT NULL,
Skirt_Item char(36) NOT NULL,
Skirt_Asset char(36) NOT NULL,
PRIMARY KEY (`Owner`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for users
-- ----------------------------
CREATE TABLE `userfriends` (
`ownerID` VARCHAR(37) NOT NULL,
`friendID` VARCHAR(37) NOT NULL,
`friendPerms` INT NOT NULL,
`datetimestamp` INT NOT NULL,
UNIQUE KEY (`ownerID`, `friendID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for users
-- ----------------------------
CREATE TABLE `users` (
`UUID` varchar(36) NOT NULL default '',
`username` varchar(32) NOT NULL,
`lastname` varchar(32) NOT NULL,
`passwordHash` varchar(32) NOT NULL,
`passwordSalt` varchar(32) NOT NULL,
`homeRegion` bigint(20) unsigned default NULL,
`homeLocationX` float default NULL,
`homeLocationY` float default NULL,
`homeLocationZ` float default NULL,
`homeLookAtX` float default NULL,
`homeLookAtY` float default NULL,
`homeLookAtZ` float default NULL,
`created` int(11) NOT NULL,
`lastLogin` int(11) NOT NULL,
`userInventoryURI` varchar(255) default NULL,
`userAssetURI` varchar(255) default NULL,
`profileCanDoMask` int(10) unsigned default NULL,
`profileWantDoMask` int(10) unsigned default NULL,
`profileAboutText` text,
`profileFirstText` text,
`profileImage` varchar(36) default NULL,
`profileFirstImage` varchar(36) default NULL,
`webLoginKey` varchar(36) default NULL,
PRIMARY KEY (`UUID`),
UNIQUE KEY `usernames` (`username`,`lastname`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records
-- ----------------------------
COMMIT;
:VERSION 2 # -----------------------------
BEGIN;
ALTER TABLE users add homeRegionID char(36) NOT NULL default '00000000-0000-0000-0000-000000000000';
COMMIT;
:VERSION 3 # -----------------------------
BEGIN;
ALTER TABLE users add userFlags integer NOT NULL default 0;
ALTER TABLE users add godLevel integer NOT NULL default 0;
COMMIT;
:VERSION 4 # -----------------------------
BEGIN;
ALTER TABLE users add customType varchar(32) not null default '';
ALTER TABLE users add partner char(36) not null default '00000000-0000-0000-0000-000000000000';
COMMIT;
:VERSION 5 # -----------------------------
BEGIN;
CREATE TABLE `avatarattachments` (`UUID` char(36) NOT NULL, `attachpoint` int(11) NOT NULL, `item` char(36) NOT NULL, `asset` char(36) NOT NULL) ENGINE=InnoDB;
COMMIT;
:VERSION 6 # -----------------------------
BEGIN;
ALTER TABLE agents add currentLookAt varchar(36) not null default '';
COMMIT;
:VERSION 7 # -----------------------------
BEGIN;
ALTER TABLE users add email varchar(250);
COMMIT;
:VERSION 8 # -----------------------------
BEGIN;
ALTER TABLE users add scopeID char(36) not null default '00000000-0000-0000-0000-000000000000';
COMMIT;

View File

@ -1,66 +1,17 @@
:VERSION 1
BEGIN TRANSACTION;
CREATE TABLE assets(
UUID varchar(255) primary key,
Name varchar(255),
Description varchar(255),
Type integer,
InvType integer,
Local integer,
Temporary integer,
Data blob);
COMMIT;
:VERSION 2
:VERSION 6
BEGIN TRANSACTION;
CREATE TEMPORARY TABLE assets_backup(UUID,Name,Description,Type,Local,Temporary,Data);
INSERT INTO assets_backup SELECT UUID,Name,Description,Type,Local,Temporary,Data FROM assets;
DROP TABLE assets;
CREATE TABLE assets(UUID,Name,Description,Type,Local,Temporary,Data);
INSERT INTO assets SELECT UUID,Name,Description,Type,Local,Temporary,Data FROM assets_backup;
DROP TABLE assets_backup;
COMMIT;
:VERSION 3
DELETE FROM assets WHERE UUID = 'dc4b9f0bd00845c696a401dd947ac621'
:VERSION 4
BEGIN;
update assets
set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12)
where UUID not like '%-%';
COMMIT;
:VERSION 5
BEGIN TRANSACTION;
CREATE TEMPORARY TABLE assets_backup(UUID,Name,Description,Type,Local,Temporary,Data);
INSERT INTO assets_backup SELECT UUID,Name,Description,Type,Local,Temporary,Data FROM assets;
DROP TABLE assets;
CREATE TABLE assets(
UUID NOT NULL PRIMARY KEY,
Name,
Description,
Type,
Local,
Temporary,
asset_flags INTEGER NOT NULL DEFAULT 0,
CreatorID varchar(128) default '',
Data);
INSERT INTO assets(UUID,Name,Description,Type,Local,Temporary,Data)
SELECT UUID,Name,Description,Type,Local,Temporary,Data FROM assets_backup;
DROP TABLE assets_backup;
CREATE TABLE IF NOT EXISTS assets(
UUID NOT NULL PRIMARY KEY,
Name,
Description,
Type,
Local,
Temporary,
asset_flags INTEGER NOT NULL DEFAULT 0,
CreatorID varchar(128) default '',
Data);
COMMIT;

View File

@ -1,23 +1,27 @@
:VERSION 6
:VERSION 10
BEGIN TRANSACTION;
CREATE TABLE estate_groups (
CREATE TABLE IF NOT EXISTS estate_groups (
EstateID int(10) NOT NULL,
uuid char(36) NOT NULL
);
CREATE INDEX estate_groups_estate_id on estate_groups(EstateID);
CREATE TABLE estate_managers (
CREATE TABLE IF NOT EXISTS estate_managers (
EstateID int(10) NOT NULL,
uuid char(36) NOT NULL
);
CREATE INDEX estate_managers_estate_id on estate_managers(EstateID);
CREATE TABLE estate_map (
CREATE TABLE IF NOT EXISTS estate_map (
RegionID char(36) NOT NULL default '00000000-0000-0000-0000-000000000000',
EstateID int(11) NOT NULL
);
CREATE INDEX estate_map_estate_id on estate_map(EstateID);
CREATE UNIQUE INDEX estate_map_region_id on estate_map(RegionID);
CREATE TABLE estate_settings (
CREATE TABLE IF NOT EXISTS estate_settings (
EstateID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
EstateName varchar(64) default NULL,
AbuseEmailToEstateOwner tinyint(4) NOT NULL,
@ -38,60 +42,28 @@ CREATE TABLE estate_settings (
SunPosition double NOT NULL,
EstateSkipScripts tinyint(4) NOT NULL,
BillableFactor float NOT NULL,
PublicAccess tinyint(4) NOT NULL
);
PublicAccess tinyint(4) NOT NULL,
AbuseEmail varchar(255) not null default '',
EstateOwner varchar(36) not null default '',
DenyMinors tinyint not null default 0,
AllowLandmark tinyint not null default '1',
AllowParcelChanges tinyint not null default '1',
AllowSetHome tinyint not null default '1');
insert into estate_settings (
EstateID,EstateName,AbuseEmailToEstateOwner,DenyAnonymous,ResetHomeOnTeleport,FixedSun,DenyTransacted,BlockDwell,DenyIdentified,AllowVoice,UseGlobalTime,PricePerMeter,TaxFree,AllowDirectTeleport,RedirectGridX,RedirectGridY,ParentEstateID,SunPosition,PublicAccess,EstateSkipScripts,BillableFactor)
values ( 99, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
delete from estate_settings;
CREATE TABLE estate_users (
CREATE TABLE IF NOT EXISTS estate_users (
EstateID int(10) NOT NULL,
uuid char(36) NOT NULL
);
CREATE INDEX estate_users_estate_id on estate_users(EstateID);
CREATE TABLE estateban (
CREATE TABLE IF NOT EXISTS estateban (
EstateID int(10) NOT NULL,
bannedUUID varchar(36) NOT NULL,
bannedIp varchar(16) NOT NULL,
bannedIpHostMask varchar(16) NOT NULL,
bannedNameMask varchar(64) default NULL
);
CREATE INDEX estate_ban_estate_id on estateban(EstateID);
CREATE INDEX estate_groups_estate_id on estate_groups(EstateID);
CREATE INDEX estate_managers_estate_id on estate_managers(EstateID);
CREATE INDEX estate_map_estate_id on estate_map(EstateID);
CREATE UNIQUE INDEX estate_map_region_id on estate_map(RegionID);
CREATE INDEX estate_users_estate_id on estate_users(EstateID);
COMMIT;
:VERSION 7
begin;
alter table estate_settings add column AbuseEmail varchar(255) not null default '';
alter table estate_settings add column EstateOwner varchar(36) not null default '';
commit;
:VERSION 8
begin;
alter table estate_settings add column DenyMinors tinyint not null default 0;
commit;
:VERSION 9
begin;
alter table estate_settings add column AllowLandmark tinyint not null default '1';
alter table estate_settings add column AllowParcelChanges tinyint not null default '1';
alter table estate_settings add column AllowSetHome tinyint not null default '1';
commit;

View File

@ -1,92 +0,0 @@
:VERSION 1
BEGIN TRANSACTION;
CREATE TABLE inventoryfolders(
UUID varchar(255) primary key,
name varchar(255),
agentID varchar(255),
parentID varchar(255),
type integer,
version integer);
CREATE TABLE inventoryitems(
UUID varchar(255) primary key,
assetID varchar(255),
assetType integer,
invType integer,
parentFolderID varchar(255),
avatarID varchar(255),
creatorsID varchar(255),
inventoryName varchar(255),
inventoryDescription varchar(255),
inventoryNextPermissions integer,
inventoryCurrentPermissions integer,
inventoryBasePermissions integer,
inventoryEveryOnePermissions integer,
salePrice integer default 99,
saleType integer default 0,
creationDate integer default 2000,
groupID varchar(255) default '00000000-0000-0000-0000-000000000000',
groupOwned integer default 0,
flags integer default 0);
COMMIT;
:VERSION 2
BEGIN TRANSACTION;
create index inventoryfolders_agentid on inventoryfolders(agentid);
create index inventoryfolders_parentid on inventoryfolders(parentid);
create index inventoryitems_parentfolderid on inventoryitems(parentfolderid);
create index inventoryitems_avatarid on inventoryitems(avatarid);
COMMIT;
:VERSION 3
BEGIN;
alter table inventoryitems add column inventoryGroupPermissions integer unsigned not null default 0;
COMMIT;
:VERSION 4
BEGIN;
update inventoryitems
set UUID = 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 inventoryitems
set assetID = substr(assetID, 1, 8) || "-" || substr(assetID, 9, 4) || "-" || substr(assetID, 13, 4) || "-" || substr(assetID, 17, 4) || "-" || substr(assetID, 21, 12)
where assetID not like '%-%';
update inventoryitems
set parentFolderID = substr(parentFolderID, 1, 8) || "-" || substr(parentFolderID, 9, 4) || "-" || substr(parentFolderID, 13, 4) || "-" || substr(parentFolderID, 17, 4) || "-" || substr(parentFolderID, 21, 12)
where parentFolderID not like '%-%';
update inventoryitems
set avatarID = substr(avatarID, 1, 8) || "-" || substr(avatarID, 9, 4) || "-" || substr(avatarID, 13, 4) || "-" || substr(avatarID, 17, 4) || "-" || substr(avatarID, 21, 12)
where avatarID not like '%-%';
update inventoryitems
set creatorsID = substr(creatorsID, 1, 8) || "-" || substr(creatorsID, 9, 4) || "-" || substr(creatorsID, 13, 4) || "-" || substr(creatorsID, 17, 4) || "-" || substr(creatorsID, 21, 12)
where creatorsID not like '%-%';
update inventoryfolders
set UUID = 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 inventoryfolders
set agentID = substr(agentID, 1, 8) || "-" || substr(agentID, 9, 4) || "-" || substr(agentID, 13, 4) || "-" || substr(agentID, 17, 4) || "-" || substr(agentID, 21, 12)
where agentID not like '%-%';
update inventoryfolders
set parentID = substr(parentID, 1, 8) || "-" || substr(parentID, 9, 4) || "-" || substr(parentID, 13, 4) || "-" || substr(parentID, 17, 4) || "-" || substr(parentID, 21, 12)
where parentID not like '%-%';
COMMIT;

View File

@ -1,56 +1,99 @@
:VERSION 1
:VERSION 31
BEGIN TRANSACTION;
CREATE TABLE prims(
UUID varchar(255) primary key,
RegionUUID varchar(255),
ParentID integer,
CreationDate integer,
Name varchar(255),
SceneGroupID varchar(255),
Text varchar(255),
Description varchar(255),
SitName varchar(255),
TouchName varchar(255),
CreatorID varchar(255),
OwnerID varchar(255),
GroupID varchar(255),
LastOwnerID varchar(255),
OwnerMask integer,
NextOwnerMask integer,
GroupMask integer,
EveryoneMask integer,
BaseMask integer,
PositionX float,
PositionY float,
PositionZ float,
GroupPositionX float,
GroupPositionY float,
GroupPositionZ float,
VelocityX float,
VelocityY float,
VelocityZ float,
AngularVelocityX float,
AngularVelocityY float,
AngularVelocityZ float,
AccelerationX float,
AccelerationY float,
AccelerationZ float,
RotationX float,
RotationY float,
RotationZ float,
RotationW float,
ObjectFlags integer,
SitTargetOffsetX float NOT NULL default 0,
SitTargetOffsetY float NOT NULL default 0,
SitTargetOffsetZ float NOT NULL default 0,
SitTargetOrientW float NOT NULL default 0,
SitTargetOrientX float NOT NULL default 0,
SitTargetOrientY float NOT NULL default 0,
SitTargetOrientZ float NOT NULL default 0);
CREATE TABLE IF NOT EXISTS prims(
UUID varchar(255) primary key,
RegionUUID varchar(255),
CreationDate integer,
Name varchar(255),
SceneGroupID varchar(255),
Text varchar(255),
Description varchar(255),
SitName varchar(255),
TouchName varchar(255),
CreatorID varchar(255),
OwnerID varchar(255),
GroupID varchar(255),
LastOwnerID varchar(255),
OwnerMask integer,
NextOwnerMask integer,
GroupMask integer,
EveryoneMask integer,
BaseMask integer,
PositionX float,
PositionY float,
PositionZ float,
GroupPositionX float,
GroupPositionY float,
GroupPositionZ float,
VelocityX float,
VelocityY float,
VelocityZ float,
AngularVelocityX float,
AngularVelocityY float,
AngularVelocityZ float,
AccelerationX float,
AccelerationY float,
AccelerationZ float,
RotationX float,
RotationY float,
RotationZ float,
RotationW float,
ObjectFlags integer,
SitTargetOffsetX float NOT NULL default 0,
SitTargetOffsetY float NOT NULL default 0,
SitTargetOffsetZ float NOT NULL default 0,
SitTargetOrientW float NOT NULL default 0,
SitTargetOrientX float NOT NULL default 0,
SitTargetOrientY float NOT NULL default 0,
SitTargetOrientZ float NOT NULL default 0,
ColorR integer not null default 0,
ColorG integer not null default 0,
ColorB integer not null default 0,
ColorA integer not null default 0,
ClickAction integer not null default 0,
PayPrice integer not null default 0,
PayButton1 integer not null default 0,
PayButton2 integer not null default 0,
PayButton3 integer not null default 0,
PayButton4 integer not null default 0,
LoopedSound varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000',
LoopedSoundGain float NOT NULL default 0,
TextureAnimation string,
ParticleSystem string,
OmegaX float NOT NULL default 0,
OmegaY float NOT NULL default 0,
OmegaZ float NOT NULL default 0,
CameraEyeOffsetX float NOT NULL default 0,
CameraEyeOffsetY float NOT NULL default 0,
CameraEyeOffsetZ float NOT NULL default 0,
CameraAtOffsetX float NOT NULL default 0,
CameraAtOffsetY float NOT NULL default 0,
CameraAtOffsetZ float NOT NULL default 0,
ForceMouselook string NOT NULL default 0,
ScriptAccessPin INTEGER NOT NULL default 0,
AllowedDrop INTEGER NOT NULL default 0,
DieAtEdge string NOT NULL default 0,
SalePrice INTEGER NOT NULL default 0,
SaleType string NOT NULL default 0,
Material INTEGER NOT NULL default 3,
CollisionSound varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000',
CollisionSoundVolume float NOT NULL default 0,
VolumeDetect INTEGER NOT NULL DEFAULT 0,
MediaURL varchar(255),
DynAttrs TEXT,
`PhysicsShapeType` tinyint(4) NOT NULL default '0',
`Density` double NOT NULL default '1000',
`GravityModifier` double NOT NULL default '1',
`Friction` double NOT NULL default '0.6',
`Restitution` double NOT NULL default '0.5',
`KeyframeMotion` blob,
AttachedPosX double default '0',
AttachedPosY double default '0',
AttachedPosZ double default '0');
CREATE TABLE primshapes(
CREATE TABLE IF NOT EXISTS primshapes(
UUID varchar(255) primary key,
Shape integer,
ScaleX float,
@ -76,10 +119,12 @@ CREATE TABLE primshapes(
ProfileCurve integer,
ProfileHollow integer,
Texture blob,
ExtraParams blob,
State Integer NOT NULL default 0);
ExtraParams blob,
State Integer NOT NULL default 0,
Media TEXT,
LastAttachPoint int not null default '0');
CREATE TABLE primitems(
CREATE TABLE IF NOT EXISTS primitems(
itemID varchar(255) primary key,
primID varchar(255),
assetID varchar(255),
@ -97,14 +142,15 @@ CREATE TABLE primitems(
currentPermissions string,
basePermissions string,
everyonePermissions string,
groupPermissions string);
groupPermissions string,
flags integer not null default 0);
CREATE TABLE terrain(
CREATE TABLE IF NOT EXISTS terrain(
RegionUUID varchar(255),
Revision integer,
Heightfield blob);
CREATE TABLE land(
CREATE TABLE IF NOT EXISTS land(
UUID varchar(255) primary key,
RegionUUID varchar(255),
LocalLandID string,
@ -135,92 +181,30 @@ CREATE TABLE land(
UserLocationZ float,
UserLookAtX float,
UserLookAtY float,
UserLookAtZ float,
AuthbuyerID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000');
UserLookAtZ float,
AuthbuyerID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000',
OtherCleanTime INTEGER NOT NULL default 0,
Dwell INTEGER NOT NULL default 0,
`MediaType` VARCHAR(32) NOT NULL DEFAULT 'none/none',
`MediaDescription` VARCHAR(255) NOT NULL DEFAULT '',
`MediaSize` VARCHAR(16) NOT NULL DEFAULT '0,0',
`MediaLoop` BOOLEAN NOT NULL DEFAULT FALSE,
`ObscureMusic` BOOLEAN NOT NULL DEFAULT FALSE,
`ObscureMedia` BOOLEAN NOT NULL DEFAULT FALSE);
CREATE TABLE landaccesslist(
CREATE TABLE IF NOT EXISTS landaccesslist(
LandUUID varchar(255),
AccessUUID varchar(255),
Flags string);
COMMIT;
CREATE TABLE IF NOT EXISTS regionban(
regionUUID varchar (255),
bannedUUID varchar (255),
bannedIp varchar (255),
bannedIpHostMask varchar (255)
);
:VERSION 2
BEGIN TRANSACTION;
CREATE TABLE regionban(
regionUUID varchar (255),
bannedUUID varchar (255),
bannedIp varchar (255),
bannedIpHostMask varchar (255)
);
COMMIT;
:VERSION 3
BEGIN;
ALTER TABLE primitems add flags integer not null default 0;
COMMIT;
:VERSION 4
BEGIN;
create table regionsettings (
regionUUID char(36) not null,
block_terraform integer not null,
block_fly integer not null,
allow_damage integer not null,
restrict_pushing integer not null,
allow_land_resell integer not null,
allow_land_join_divide integer not null,
block_show_in_search integer not null,
agent_limit integer not null,
object_bonus float not null,
maturity integer not null,
disable_scripts integer not null,
disable_collisions integer not null,
disable_physics integer not null,
terrain_texture_1 char(36) not null,
terrain_texture_2 char(36) not null,
terrain_texture_3 char(36) not null,
terrain_texture_4 char(36) not null,
elevation_1_nw float not null,
elevation_2_nw float not null,
elevation_1_ne float not null,
elevation_2_ne float not null,
elevation_1_se float not null,
elevation_2_se float not null,
elevation_1_sw float not null,
elevation_2_sw float not null,
water_height float not null,
terrain_raise_limit float not null,
terrain_lower_limit float not null,
use_estate_sun integer not null,
fixed_sun integer not null,
sun_position float not null,
covenant char(36));
COMMIT;
:VERSION 5
BEGIN;
delete from regionsettings;
COMMIT;
:VERSION 6
BEGIN TRANSACTION;
drop table regionsettings;
CREATE TABLE regionsettings (
CREATE TABLE IF NOT EXISTS regionsettings (
regionUUID char(36) NOT NULL,
block_terraform int(11) NOT NULL,
block_fly int(11) NOT NULL,
@ -254,228 +238,18 @@ CREATE TABLE regionsettings (
fixed_sun int(11) NOT NULL,
sun_position float NOT NULL,
covenant char(36) default NULL,
sandbox tinyint(4) NOT NULL,
sandbox tinyint(4) NOT NULL,
sunvectorx double NOT NULL default 0,
sunvectory double NOT NULL default 0,
sunvectorz double NOT NULL default 0,
map_tile_ID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000',
covenant_datetime INTEGER NOT NULL default 0,
`TelehubObject` varchar(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
`parcel_tile_ID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
PRIMARY KEY (regionUUID)
);
COMMIT;
:VERSION 9
BEGIN;
ALTER TABLE prims ADD COLUMN ColorR integer not null default 0;
ALTER TABLE prims ADD COLUMN ColorG integer not null default 0;
ALTER TABLE prims ADD COLUMN ColorB integer not null default 0;
ALTER TABLE prims ADD COLUMN ColorA integer not null default 0;
COMMIT;
:VERSION 10
BEGIN;
ALTER TABLE prims ADD COLUMN ClickAction INTEGER NOT NULL default 0;
COMMIT;
:VERSION 11
BEGIN;
ALTER TABLE prims ADD COLUMN PayPrice INTEGER NOT NULL default 0;
ALTER TABLE prims ADD COLUMN PayButton1 INTEGER NOT NULL default 0;
ALTER TABLE prims ADD COLUMN PayButton2 INTEGER NOT NULL default 0;
ALTER TABLE prims ADD COLUMN PayButton3 INTEGER NOT NULL default 0;
ALTER TABLE prims ADD COLUMN PayButton4 INTEGER NOT NULL default 0;
ALTER TABLE prims ADD COLUMN LoopedSound varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000';
ALTER TABLE prims ADD COLUMN LoopedSoundGain float NOT NULL default 0;
ALTER TABLE prims ADD COLUMN TextureAnimation string;
ALTER TABLE prims ADD COLUMN ParticleSystem string;
ALTER TABLE prims ADD COLUMN OmegaX float NOT NULL default 0;
ALTER TABLE prims ADD COLUMN OmegaY float NOT NULL default 0;
ALTER TABLE prims ADD COLUMN OmegaZ float NOT NULL default 0;
ALTER TABLE prims ADD COLUMN CameraEyeOffsetX float NOT NULL default 0;
ALTER TABLE prims ADD COLUMN CameraEyeOffsetY float NOT NULL default 0;
ALTER TABLE prims ADD COLUMN CameraEyeOffsetZ float NOT NULL default 0;
ALTER TABLE prims ADD COLUMN CameraAtOffsetX float NOT NULL default 0;
ALTER TABLE prims ADD COLUMN CameraAtOffsetY float NOT NULL default 0;
ALTER TABLE prims ADD COLUMN CameraAtOffsetZ float NOT NULL default 0;
ALTER TABLE prims ADD COLUMN ForceMouselook string NOT NULL default 0;
ALTER TABLE prims ADD COLUMN ScriptAccessPin INTEGER NOT NULL default 0;
ALTER TABLE prims ADD COLUMN AllowedDrop INTEGER NOT NULL default 0;
ALTER TABLE prims ADD COLUMN DieAtEdge string NOT NULL default 0;
ALTER TABLE prims ADD COLUMN SalePrice INTEGER NOT NULL default 0;
ALTER TABLE prims ADD COLUMN SaleType string NOT NULL default 0;
COMMIT;
:VERSION 12
BEGIN;
ALTER TABLE prims ADD COLUMN Material INTEGER NOT NULL default 3;
COMMIT;
:VERSION 13
BEGIN;
ALTER TABLE land ADD COLUMN OtherCleanTime INTEGER NOT NULL default 0;
ALTER TABLE land ADD COLUMN Dwell INTEGER NOT NULL default 0;
COMMIT;
:VERSION 14
begin;
ALTER TABLE regionsettings ADD COLUMN sunvectorx double NOT NULL default 0;
ALTER TABLE regionsettings ADD COLUMN sunvectory double NOT NULL default 0;
ALTER TABLE regionsettings ADD COLUMN sunvectorz double NOT NULL default 0;
commit;
:VERSION 15
BEGIN;
ALTER TABLE prims ADD COLUMN CollisionSound varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000';
ALTER TABLE prims ADD COLUMN CollisionSoundVolume float NOT NULL default 0;
COMMIT;
:VERSION 16
BEGIN;
ALTER TABLE prims ADD COLUMN VolumeDetect INTEGER NOT NULL DEFAULT 0;
COMMIT;
:VERSION 17
BEGIN;
CREATE TEMPORARY TABLE prims_backup(UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,CreatorID,OwnerID,GroupID,LastOwnerID,OwnerMask,NextOwnerMask,GroupMask,EveryoneMask,BaseMask,PositionX,PositionY,PositionZ,GroupPositionX,GroupPositionY,GroupPositionZ,VelocityX,VelocityY,VelocityZ,AngularVelocityX,AngularVelocityY,AngularVelocityZ,AccelerationX,AccelerationY,AccelerationZ,RotationX,RotationY,RotationZ,RotationW,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect);
INSERT INTO prims_backup SELECT UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,CreatorID,OwnerID,GroupID,LastOwnerID,OwnerMask,NextOwnerMask,GroupMask,EveryoneMask,BaseMask,PositionX,PositionY,PositionZ,GroupPositionX,GroupPositionY,GroupPositionZ,VelocityX,VelocityY,VelocityZ,AngularVelocityX,AngularVelocityY,AngularVelocityZ,AccelerationX,AccelerationY,AccelerationZ,RotationX,RotationY,RotationZ,RotationW,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect FROM prims;
DROP TABLE prims;
CREATE TABLE prims(UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,CreatorID,OwnerID,GroupID,LastOwnerID,OwnerMask,NextOwnerMask,GroupMask,EveryoneMask,BaseMask,PositionX,PositionY,PositionZ,GroupPositionX,GroupPositionY,GroupPositionZ,VelocityX,VelocityY,VelocityZ,AngularVelocityX,AngularVelocityY,AngularVelocityZ,AccelerationX,AccelerationY,AccelerationZ,RotationX,RotationY,RotationZ,RotationW,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect);
INSERT INTO prims SELECT UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,CreatorID,OwnerID,GroupID,LastOwnerID,OwnerMask,NextOwnerMask,GroupMask,EveryoneMask,BaseMask,PositionX,PositionY,PositionZ,GroupPositionX,GroupPositionY,GroupPositionZ,VelocityX,VelocityY,VelocityZ,AngularVelocityX,AngularVelocityY,AngularVelocityZ,AccelerationX,AccelerationY,AccelerationZ,RotationX,RotationY,RotationZ,RotationW,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect FROM prims_backup;
DROP TABLE prims_backup;
COMMIT;
:VERSION 18
BEGIN;
update terrain
set RegionUUID = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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;
:VERSION 19
BEGIN;
ALTER TABLE regionsettings ADD COLUMN map_tile_ID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000';
COMMIT;
:VERSION 20
BEGIN;
ALTER TABLE prims ADD COLUMN MediaURL varchar(255);
ALTER TABLE primshapes ADD COLUMN Media TEXT;
COMMIT;
:VERSION 21
BEGIN;
ALTER TABLE `land` ADD COLUMN `MediaType` VARCHAR(32) NOT NULL DEFAULT 'none/none';
ALTER TABLE `land` ADD COLUMN `MediaDescription` VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE `land` ADD COLUMN `MediaSize` VARCHAR(16) NOT NULL DEFAULT '0,0';
ALTER TABLE `land` ADD COLUMN `MediaLoop` BOOLEAN NOT NULL DEFAULT FALSE;
ALTER TABLE `land` ADD COLUMN `ObscureMusic` BOOLEAN NOT NULL DEFAULT FALSE;
ALTER TABLE `land` ADD COLUMN `ObscureMedia` BOOLEAN NOT NULL DEFAULT FALSE;
COMMIT;
:VERSION 22
BEGIN;
ALTER TABLE regionsettings ADD COLUMN covenant_datetime INTEGER NOT NULL default 0;
COMMIT;
:VERSION 23
BEGIN;
CREATE TABLE regionwindlight (
CREATE TABLE IF NOT EXISTS regionwindlight (
region_id VARCHAR(36) NOT NULL DEFAULT '000000-0000-0000-0000-000000000000' PRIMARY KEY,
water_color_r FLOAT NOT NULL DEFAULT '4.000000',
water_color_g FLOAT NOT NULL DEFAULT '38.000000',
@ -541,13 +315,6 @@ CREATE TABLE regionwindlight (
cloud_scroll_y_lock INTEGER NOT NULL DEFAULT '0',
draw_classic_clouds INTEGER NOT NULL DEFAULT '1');
COMMIT;
:VERSION 24
BEGIN;
CREATE TABLE IF NOT EXISTS `spawn_points` (
`RegionID` varchar(36) NOT NULL DEFAULT '000000-0000-0000-0000-000000000000',
`Yaw` float NOT NULL,
@ -555,60 +322,10 @@ CREATE TABLE IF NOT EXISTS `spawn_points` (
`Distance` float NOT NULL
);
ALTER TABLE `regionsettings` ADD COLUMN `TelehubObject` varchar(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
COMMIT;
:VERSION 25
BEGIN;
ALTER TABLE `regionsettings` ADD COLUMN `parcel_tile_ID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
COMMIT;
:VERSION 26
BEGIN;
CREATE TABLE `regionenvironment` (
CREATE TABLE IF NOT EXISTS `regionenvironment` (
`region_id` varchar(36) NOT NULL DEFAULT '000000-0000-0000-0000-000000000000' PRIMARY KEY,
`llsd_settings` TEXT NOT NULL
);
COMMIT;
:VERSION 27
BEGIN;
ALTER TABLE prims ADD COLUMN DynAttrs TEXT;
COMMIT;
:VERSION 28
BEGIN;
ALTER TABLE prims ADD COLUMN `PhysicsShapeType` tinyint(4) NOT NULL default '0';
ALTER TABLE prims ADD COLUMN `Density` double NOT NULL default '1000';
ALTER TABLE prims ADD COLUMN `GravityModifier` double NOT NULL default '1';
ALTER TABLE prims ADD COLUMN `Friction` double NOT NULL default '0.6';
ALTER TABLE prims ADD COLUMN `Restitution` double NOT NULL default '0.5';
COMMIT;
:VERSION 29 #---------------- Keyframes
BEGIN;
ALTER TABLE prims ADD COLUMN `KeyframeMotion` blob;
COMMIT;
:VERSION 30 #---------------- Save Attachment info
BEGIN;
ALTER TABLE prims ADD COLUMN AttachedPosX double default '0';
ALTER TABLE prims ADD COLUMN AttachedPosY double default '0';
ALTER TABLE prims ADD COLUMN AttachedPosZ double default '0';
ALTER TABLE primshapes ADD COLUMN LastAttachPoint int not null default '0';
COMMIT;

View File

@ -1,169 +0,0 @@
:VERSION 1
BEGIN TRANSACTION;
-- users table
CREATE TABLE users(
UUID varchar(255) primary key,
username varchar(255),
surname varchar(255),
passwordHash varchar(255),
passwordSalt varchar(255),
homeRegionX integer,
homeRegionY integer,
homeLocationX float,
homeLocationY float,
homeLocationZ float,
homeLookAtX float,
homeLookAtY float,
homeLookAtZ float,
created integer,
lastLogin integer,
rootInventoryFolderID varchar(255),
userInventoryURI varchar(255),
userAssetURI varchar(255),
profileCanDoMask integer,
profileWantDoMask integer,
profileAboutText varchar(255),
profileFirstText varchar(255),
profileImage varchar(255),
profileFirstImage varchar(255),
webLoginKey text default '00000000-0000-0000-0000-000000000000');
-- friends table
CREATE TABLE userfriends(
ownerID varchar(255),
friendID varchar(255),
friendPerms integer,
ownerPerms integer,
datetimestamp integer);
COMMIT;
:VERSION 2
BEGIN;
ALTER TABLE users add homeRegionID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000';
COMMIT;
:VERSION 3
BEGIN;
ALTER TABLE users add userFlags integer NOT NULL default 0;
ALTER TABLE users add godLevel integer NOT NULL default 0;
COMMIT;
:VERSION 4
BEGIN;
ALTER TABLE users add customType varchar(32) not null default '';
ALTER TABLE users add partner char(36) not null default '00000000-0000-0000-0000-000000000000';
COMMIT;
:VERSION 5
BEGIN;
CREATE TABLE `avatarattachments` (`UUID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', `attachpoint` int(11) NOT NULL DEFAULT 0, `item` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', `asset` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000');
COMMIT;
:VERSION 6
BEGIN TRANSACTION;
-- usersagents table
CREATE TABLE IF NOT EXISTS useragents(
UUID varchar(255) primary key,
agentIP varchar(255),
agentPort integer,
agentOnline boolean,
sessionID varchar(255),
secureSessionID varchar(255),
regionID varchar(255),
loginTime integer,
logoutTime integer,
currentRegion varchar(255),
currentHandle varchar(255),
currentPosX float,
currentPosY float,
currentPosZ float);
COMMIT;
:VERSION 7
BEGIN TRANSACTION;
ALTER TABLE useragents add currentLookAtX float not null default 128;
ALTER TABLE useragents add currentLookAtY float not null default 128;
ALTER TABLE useragents add currentLookAtZ float not null default 70;
COMMIT;
:VERSION 8
BEGIN TRANSACTION;
ALTER TABLE users add email varchar(250);
COMMIT;
:VERSION 9
BEGIN;
update users
set UUID = 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 useragents
set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12)
where UUID not like '%-%';
COMMIT;
:VERSION 10
BEGIN TRANSACTION;
CREATE TABLE IF NOT EXISTS avatarappearance(
Owner varchar(36) NOT NULL primary key,
BodyItem varchar(36) DEFAULT NULL,
BodyAsset varchar(36) DEFAULT NULL,
SkinItem varchar(36) DEFAULT NULL,
SkinAsset varchar(36) DEFAULT NULL,
HairItem varchar(36) DEFAULT NULL,
HairAsset varchar(36) DEFAULT NULL,
EyesItem varchar(36) DEFAULT NULL,
EyesAsset varchar(36) DEFAULT NULL,
ShirtItem varchar(36) DEFAULT NULL,
ShirtAsset varchar(36) DEFAULT NULL,
PantsItem varchar(36) DEFAULT NULL,
PantsAsset varchar(36) DEFAULT NULL,
ShoesItem varchar(36) DEFAULT NULL,
ShoesAsset varchar(36) DEFAULT NULL,
SocksItem varchar(36) DEFAULT NULL,
SocksAsset varchar(36) DEFAULT NULL,
JacketItem varchar(36) DEFAULT NULL,
JacketAsset varchar(36) DEFAULT NULL,
GlovesItem varchar(36) DEFAULT NULL,
GlovesAsset varchar(36) DEFAULT NULL,
UnderShirtItem varchar(36) DEFAULT NULL,
UnderShirtAsset varchar(36) DEFAULT NULL,
UnderPantsItem varchar(36) DEFAULT NULL,
UnderPantsAsset varchar(36) DEFAULT NULL,
SkirtItem varchar(36) DEFAULT NULL,
SkirtAsset varchar(36) DEFAULT NULL,
Texture blob,
VisualParams blob,
Serial int DEFAULT NULL,
AvatarHeight float DEFAULT NULL
);
COMMIT;

View File

@ -1,916 +0,0 @@
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections.Generic;
using System.Data;
using System.Reflection;
using log4net;
#if CSharpSqlite
using Community.CsharpSqlite.Sqlite;
#else
using Mono.Data.Sqlite;
#endif
using OpenMetaverse;
using OpenSim.Framework;
namespace OpenSim.Data.SQLite
{
/// <summary>
/// An Inventory Interface to the SQLite database
/// </summary>
public class SQLiteInventoryStore : SQLiteUtil, IInventoryDataPlugin
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private const string invItemsSelect = "select * from inventoryitems";
private const string invFoldersSelect = "select * from inventoryfolders";
private static SqliteConnection conn;
private static DataSet ds;
private static SqliteDataAdapter invItemsDa;
private static SqliteDataAdapter invFoldersDa;
private static bool m_Initialized = false;
public void Initialise()
{
m_log.Info("[SQLiteInventoryData]: " + Name + " cannot be default-initialized!");
throw new PluginNotInitialisedException(Name);
}
/// <summary>
/// <list type="bullet">
/// <item>Initialises Inventory interface</item>
/// <item>Loads and initialises a new SQLite connection and maintains it.</item>
/// <item>use default URI if connect string string is empty.</item>
/// </list>
/// </summary>
/// <param name="dbconnect">connect string</param>
public void Initialise(string dbconnect)
{
if (!m_Initialized)
{
m_Initialized = true;
if (Util.IsWindows())
Util.LoadArchSpecificWindowsDll("sqlite3.dll");
if (dbconnect == string.Empty)
{
dbconnect = "URI=file:inventoryStore.db,version=3";
}
m_log.Info("[INVENTORY DB]: Sqlite - connecting: " + dbconnect);
conn = new SqliteConnection(dbconnect);
conn.Open();
Assembly assem = GetType().Assembly;
Migration m = new Migration(conn, assem, "InventoryStore");
m.Update();
SqliteCommand itemsSelectCmd = new SqliteCommand(invItemsSelect, conn);
invItemsDa = new SqliteDataAdapter(itemsSelectCmd);
// SqliteCommandBuilder primCb = new SqliteCommandBuilder(primDa);
SqliteCommand foldersSelectCmd = new SqliteCommand(invFoldersSelect, conn);
invFoldersDa = new SqliteDataAdapter(foldersSelectCmd);
ds = new DataSet();
ds.Tables.Add(createInventoryFoldersTable());
invFoldersDa.Fill(ds.Tables["inventoryfolders"]);
setupFoldersCommands(invFoldersDa, conn);
CreateDataSetMapping(invFoldersDa, "inventoryfolders");
m_log.Info("[INVENTORY DB]: Populated Inventory Folders Definitions");
ds.Tables.Add(createInventoryItemsTable());
invItemsDa.Fill(ds.Tables["inventoryitems"]);
setupItemsCommands(invItemsDa, conn);
CreateDataSetMapping(invItemsDa, "inventoryitems");
m_log.Info("[INVENTORY DB]: Populated Inventory Items Definitions");
ds.AcceptChanges();
}
}
/// <summary>
/// Closes the inventory interface
/// </summary>
public void Dispose()
{
if (conn != null)
{
conn.Close();
conn = null;
}
if (invItemsDa != null)
{
invItemsDa.Dispose();
invItemsDa = null;
}
if (invFoldersDa != null)
{
invFoldersDa.Dispose();
invFoldersDa = null;
}
if (ds != null)
{
ds.Dispose();
ds = null;
}
}
/// <summary>
///
/// </summary>
/// <param name="row"></param>
/// <returns></returns>
public InventoryItemBase buildItem(DataRow row)
{
InventoryItemBase item = new InventoryItemBase();
item.ID = new UUID((string) row["UUID"]);
item.AssetID = new UUID((string) row["assetID"]);
item.AssetType = Convert.ToInt32(row["assetType"]);
item.InvType = Convert.ToInt32(row["invType"]);
item.Folder = new UUID((string) row["parentFolderID"]);
item.Owner = new UUID((string) row["avatarID"]);
item.CreatorIdentification = (string)row["creatorsID"];
item.Name = (string) row["inventoryName"];
item.Description = (string) row["inventoryDescription"];
item.NextPermissions = Convert.ToUInt32(row["inventoryNextPermissions"]);
item.CurrentPermissions = Convert.ToUInt32(row["inventoryCurrentPermissions"]);
item.BasePermissions = Convert.ToUInt32(row["inventoryBasePermissions"]);
item.EveryOnePermissions = Convert.ToUInt32(row["inventoryEveryOnePermissions"]);
item.GroupPermissions = Convert.ToUInt32(row["inventoryGroupPermissions"]);
// new fields
if (!Convert.IsDBNull(row["salePrice"]))
item.SalePrice = Convert.ToInt32(row["salePrice"]);
if (!Convert.IsDBNull(row["saleType"]))
item.SaleType = Convert.ToByte(row["saleType"]);
if (!Convert.IsDBNull(row["creationDate"]))
item.CreationDate = Convert.ToInt32(row["creationDate"]);
if (!Convert.IsDBNull(row["groupID"]))
item.GroupID = new UUID((string)row["groupID"]);
if (!Convert.IsDBNull(row["groupOwned"]))
item.GroupOwned = Convert.ToBoolean(row["groupOwned"]);
if (!Convert.IsDBNull(row["Flags"]))
item.Flags = Convert.ToUInt32(row["Flags"]);
return item;
}
/// <summary>
/// Fill a database row with item data
/// </summary>
/// <param name="row"></param>
/// <param name="item"></param>
private static void fillItemRow(DataRow row, InventoryItemBase item)
{
row["UUID"] = item.ID.ToString();
row["assetID"] = item.AssetID.ToString();
row["assetType"] = item.AssetType;
row["invType"] = item.InvType;
row["parentFolderID"] = item.Folder.ToString();
row["avatarID"] = item.Owner.ToString();
row["creatorsID"] = item.CreatorIdentification.ToString();
row["inventoryName"] = item.Name;
row["inventoryDescription"] = item.Description;
row["inventoryNextPermissions"] = item.NextPermissions;
row["inventoryCurrentPermissions"] = item.CurrentPermissions;
row["inventoryBasePermissions"] = item.BasePermissions;
row["inventoryEveryOnePermissions"] = item.EveryOnePermissions;
row["inventoryGroupPermissions"] = item.GroupPermissions;
// new fields
row["salePrice"] = item.SalePrice;
row["saleType"] = item.SaleType;
row["creationDate"] = item.CreationDate;
row["groupID"] = item.GroupID.ToString();
row["groupOwned"] = item.GroupOwned;
row["flags"] = item.Flags;
}
/// <summary>
/// Add inventory folder
/// </summary>
/// <param name="folder">Folder base</param>
/// <param name="add">true=create folder. false=update existing folder</param>
/// <remarks>nasty</remarks>
private void addFolder(InventoryFolderBase folder, bool add)
{
lock (ds)
{
DataTable inventoryFolderTable = ds.Tables["inventoryfolders"];
DataRow inventoryRow = inventoryFolderTable.Rows.Find(folder.ID.ToString());
if (inventoryRow == null)
{
if (! add)
m_log.ErrorFormat("Interface Misuse: Attempting to Update non-existent inventory folder: {0}", folder.ID);
inventoryRow = inventoryFolderTable.NewRow();
fillFolderRow(inventoryRow, folder);
inventoryFolderTable.Rows.Add(inventoryRow);
}
else
{
if (add)
m_log.ErrorFormat("Interface Misuse: Attempting to Add inventory folder that already exists: {0}", folder.ID);
fillFolderRow(inventoryRow, folder);
}
invFoldersDa.Update(ds, "inventoryfolders");
}
}
/// <summary>
/// Move an inventory folder
/// </summary>
/// <param name="folder">folder base</param>
private void moveFolder(InventoryFolderBase folder)
{
lock (ds)
{
DataTable inventoryFolderTable = ds.Tables["inventoryfolders"];
DataRow inventoryRow = inventoryFolderTable.Rows.Find(folder.ID.ToString());
if (inventoryRow == null)
{
inventoryRow = inventoryFolderTable.NewRow();
fillFolderRow(inventoryRow, folder);
inventoryFolderTable.Rows.Add(inventoryRow);
}
else
{
moveFolderRow(inventoryRow, folder);
}
invFoldersDa.Update(ds, "inventoryfolders");
}
}
/// <summary>
/// add an item in inventory
/// </summary>
/// <param name="item">the item</param>
/// <param name="add">true=add item ; false=update existing item</param>
private void addItem(InventoryItemBase item, bool add)
{
lock (ds)
{
DataTable inventoryItemTable = ds.Tables["inventoryitems"];
DataRow inventoryRow = inventoryItemTable.Rows.Find(item.ID.ToString());
if (inventoryRow == null)
{
if (!add)
m_log.ErrorFormat("[INVENTORY DB]: Interface Misuse: Attempting to Update non-existent inventory item: {0}", item.ID);
inventoryRow = inventoryItemTable.NewRow();
fillItemRow(inventoryRow, item);
inventoryItemTable.Rows.Add(inventoryRow);
}
else
{
if (add)
m_log.ErrorFormat("[INVENTORY DB]: Interface Misuse: Attempting to Add inventory item that already exists: {0}", item.ID);
fillItemRow(inventoryRow, item);
}
invItemsDa.Update(ds, "inventoryitems");
DataTable inventoryFolderTable = ds.Tables["inventoryfolders"];
inventoryRow = inventoryFolderTable.Rows.Find(item.Folder.ToString());
if (inventoryRow != null) //MySQL doesn't throw an exception here, so sqlite shouldn't either.
inventoryRow["version"] = (int)inventoryRow["version"] + 1;
invFoldersDa.Update(ds, "inventoryfolders");
}
}
/// <summary>
/// TODO : DataSet commit
/// </summary>
public void Shutdown()
{
// TODO: DataSet commit
}
/// <summary>
/// The name of this DB provider
/// </summary>
/// <returns>Name of DB provider</returns>
public string Name
{
get { return "SQLite Inventory Data Interface"; }
}
/// <summary>
/// Returns the version of this DB provider
/// </summary>
/// <returns>A string containing the DB provider version</returns>
public string Version
{
get
{
Module module = GetType().Module;
// string dllName = module.Assembly.ManifestModule.Name;
Version dllVersion = module.Assembly.GetName().Version;
return
string.Format("{0}.{1}.{2}.{3}", dllVersion.Major, dllVersion.Minor, dllVersion.Build,
dllVersion.Revision);
}
}
/// <summary>
/// Returns a list of inventory items contained within the specified folder
/// </summary>
/// <param name="folderID">The UUID of the target folder</param>
/// <returns>A List of InventoryItemBase items</returns>
public List<InventoryItemBase> getInventoryInFolder(UUID folderID)
{
lock (ds)
{
List<InventoryItemBase> retval = new List<InventoryItemBase>();
DataTable inventoryItemTable = ds.Tables["inventoryitems"];
string selectExp = "parentFolderID = '" + folderID + "'";
DataRow[] rows = inventoryItemTable.Select(selectExp);
foreach (DataRow row in rows)
{
retval.Add(buildItem(row));
}
return retval;
}
}
/// <summary>
/// Returns a list of the root folders within a users inventory
/// </summary>
/// <param name="user">The user whos inventory is to be searched</param>
/// <returns>A list of folder objects</returns>
public List<InventoryFolderBase> getUserRootFolders(UUID user)
{
return new List<InventoryFolderBase>();
}
// see InventoryItemBase.getUserRootFolder
public InventoryFolderBase getUserRootFolder(UUID user)
{
lock (ds)
{
List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
DataTable inventoryFolderTable = ds.Tables["inventoryfolders"];
string selectExp = "agentID = '" + user + "' AND parentID = '" + UUID.Zero + "'";
DataRow[] rows = inventoryFolderTable.Select(selectExp);
foreach (DataRow row in rows)
{
folders.Add(buildFolder(row));
}
// There should only ever be one root folder for a user. However, if there's more
// than one we'll simply use the first one rather than failing. It would be even
// nicer to print some message to this effect, but this feels like it's too low a
// to put such a message out, and it's too minor right now to spare the time to
// suitably refactor.
if (folders.Count > 0)
{
return folders[0];
}
return null;
}
}
/// <summary>
/// Append a list of all the child folders of a parent folder
/// </summary>
/// <param name="folders">list where folders will be appended</param>
/// <param name="parentID">ID of parent</param>
protected void getInventoryFolders(ref List<InventoryFolderBase> folders, UUID parentID)
{
lock (ds)
{
DataTable inventoryFolderTable = ds.Tables["inventoryfolders"];
string selectExp = "parentID = '" + parentID + "'";
DataRow[] rows = inventoryFolderTable.Select(selectExp);
foreach (DataRow row in rows)
{
folders.Add(buildFolder(row));
}
}
}
/// <summary>
/// Returns a list of inventory folders contained in the folder 'parentID'
/// </summary>
/// <param name="parentID">The folder to get subfolders for</param>
/// <returns>A list of inventory folders</returns>
public List<InventoryFolderBase> getInventoryFolders(UUID parentID)
{
List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
getInventoryFolders(ref folders, parentID);
return folders;
}
/// <summary>
/// See IInventoryDataPlugin
/// </summary>
/// <param name="parentID"></param>
/// <returns></returns>
public List<InventoryFolderBase> getFolderHierarchy(UUID parentID)
{
/* Note: There are subtle changes between this implementation of getFolderHierarchy and the previous one
* - We will only need to hit the database twice instead of n times.
* - We assume the database is well-formed - no stranded/dangling folders, all folders in heirarchy owned
* by the same person, each user only has 1 inventory heirarchy
* - The returned list is not ordered, instead of breadth-first ordered
There are basically 2 usage cases for getFolderHeirarchy:
1) Getting the user's entire inventory heirarchy when they log in
2) Finding a subfolder heirarchy to delete when emptying the trash.
This implementation will pull all inventory folders from the database, and then prune away any folder that
is not part of the requested sub-heirarchy. The theory is that it is cheaper to make 1 request from the
database than to make n requests. This pays off only if requested heirarchy is large.
By making this choice, we are making the worst case better at the cost of making the best case worse
- Francis
*/
List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
DataRow[] folderRows = null, parentRow;
InventoryFolderBase parentFolder = null;
lock (ds)
{
/* Fetch the parent folder from the database to determine the agent ID.
* Then fetch all inventory folders for that agent from the agent ID.
*/
DataTable inventoryFolderTable = ds.Tables["inventoryfolders"];
string selectExp = "UUID = '" + parentID + "'";
parentRow = inventoryFolderTable.Select(selectExp); // Assume at most 1 result
if (parentRow.GetLength(0) >= 1) // No result means parent folder does not exist
{
parentFolder = buildFolder(parentRow[0]);
UUID agentID = parentFolder.Owner;
selectExp = "agentID = '" + agentID + "'";
folderRows = inventoryFolderTable.Select(selectExp);
}
if (folderRows != null && folderRows.GetLength(0) >= 1) // No result means parent folder does not exist
{ // or has no children
/* if we're querying the root folder, just return an unordered list of all folders in the user's
* inventory
*/
if (parentFolder.ParentID == UUID.Zero)
{
foreach (DataRow row in folderRows)
{
InventoryFolderBase curFolder = buildFolder(row);
if (curFolder.ID != parentID) // Return all folders except the parent folder of heirarchy
folders.Add(buildFolder(row));
}
} // If requesting root folder
/* else we are querying a non-root folder. We currently have a list of all of the user's folders,
* we must construct a list of all folders in the heirarchy below parentID.
* Our first step will be to construct a hash table of all folders, indexed by parent ID.
* Once we have constructed the hash table, we will do a breadth-first traversal on the tree using the
* hash table to find child folders.
*/
else
{ // Querying a non-root folder
// Build a hash table of all user's inventory folders, indexed by each folder's parent ID
Dictionary<UUID, List<InventoryFolderBase>> hashtable =
new Dictionary<UUID, List<InventoryFolderBase>>(folderRows.GetLength(0));
foreach (DataRow row in folderRows)
{
InventoryFolderBase curFolder = buildFolder(row);
if (curFolder.ParentID != UUID.Zero) // Discard root of tree - not needed
{
if (hashtable.ContainsKey(curFolder.ParentID))
{
// Current folder already has a sibling - append to sibling list
hashtable[curFolder.ParentID].Add(curFolder);
}
else
{
List<InventoryFolderBase> siblingList = new List<InventoryFolderBase>();
siblingList.Add(curFolder);
// Current folder has no known (yet) siblings
hashtable.Add(curFolder.ParentID, siblingList);
}
}
} // For all inventory folders
// Note: Could release the ds lock here - we don't access folderRows or the database anymore.
// This is somewhat of a moot point as the callers of this function usually lock db anyways.
if (hashtable.ContainsKey(parentID)) // if requested folder does have children
folders.AddRange(hashtable[parentID]);
// BreadthFirstSearch build inventory tree **Note: folders.Count is *not* static
for (int i = 0; i < folders.Count; i++)
if (hashtable.ContainsKey(folders[i].ID))
folders.AddRange(hashtable[folders[i].ID]);
} // if requesting a subfolder heirarchy
} // if folder parentID exists and has children
} // lock ds
return folders;
}
/// <summary>
/// Returns an inventory item by its UUID
/// </summary>
/// <param name="item">The UUID of the item to be returned</param>
/// <returns>A class containing item information</returns>
public InventoryItemBase getInventoryItem(UUID item)
{
lock (ds)
{
DataRow row = ds.Tables["inventoryitems"].Rows.Find(item.ToString());
if (row != null)
{
return buildItem(row);
}
else
{
return null;
}
}
}
/// <summary>
/// Returns a specified inventory folder by its UUID
/// </summary>
/// <param name="folder">The UUID of the folder to be returned</param>
/// <returns>A class containing folder information</returns>
public InventoryFolderBase getInventoryFolder(UUID folder)
{
// TODO: Deep voodoo here. If you enable this code then
// multi region breaks. No idea why, but I figured it was
// better to leave multi region at this point. It does mean
// that you don't get to see system textures why creating
// clothes and the like. :(
lock (ds)
{
DataRow row = ds.Tables["inventoryfolders"].Rows.Find(folder.ToString());
if (row != null)
{
return buildFolder(row);
}
else
{
return null;
}
}
}
/// <summary>
/// Creates a new inventory item based on item
/// </summary>
/// <param name="item">The item to be created</param>
public void addInventoryItem(InventoryItemBase item)
{
addItem(item, true);
}
/// <summary>
/// Updates an inventory item with item (updates based on ID)
/// </summary>
/// <param name="item">The updated item</param>
public void updateInventoryItem(InventoryItemBase item)
{
addItem(item, false);
}
/// <summary>
/// Delete an inventory item
/// </summary>
/// <param name="item">The item UUID</param>
public void deleteInventoryItem(UUID itemID)
{
lock (ds)
{
DataTable inventoryItemTable = ds.Tables["inventoryitems"];
DataRow inventoryRow = inventoryItemTable.Rows.Find(itemID.ToString());
if (inventoryRow != null)
{
inventoryRow.Delete();
}
invItemsDa.Update(ds, "inventoryitems");
}
}
public InventoryItemBase queryInventoryItem(UUID itemID)
{
return getInventoryItem(itemID);
}
public InventoryFolderBase queryInventoryFolder(UUID folderID)
{
return getInventoryFolder(folderID);
}
/// <summary>
/// Delete all items in the specified folder
/// </summary>
/// <param name="folderId">id of the folder, whose item content should be deleted</param>
/// <todo>this is horribly inefficient, but I don't want to ruin the overall structure of this implementation</todo>
private void deleteItemsInFolder(UUID folderId)
{
List<InventoryItemBase> items = getInventoryInFolder(folderId);
foreach (InventoryItemBase i in items)
deleteInventoryItem(i.ID);
}
/// <summary>
/// Adds a new folder specified by folder
/// </summary>
/// <param name="folder">The inventory folder</param>
public void addInventoryFolder(InventoryFolderBase folder)
{
addFolder(folder, true);
}
/// <summary>
/// Updates a folder based on its ID with folder
/// </summary>
/// <param name="folder">The inventory folder</param>
public void updateInventoryFolder(InventoryFolderBase folder)
{
addFolder(folder, false);
}
/// <summary>
/// Moves a folder based on its ID with folder
/// </summary>
/// <param name="folder">The inventory folder</param>
public void moveInventoryFolder(InventoryFolderBase folder)
{
moveFolder(folder);
}
/// <summary>
/// Delete a folder
/// </summary>
/// <remarks>
/// This will clean-up any child folders and child items as well
/// </remarks>
/// <param name="folderID">the folder UUID</param>
public void deleteInventoryFolder(UUID folderID)
{
lock (ds)
{
List<InventoryFolderBase> subFolders = getFolderHierarchy(folderID);
DataTable inventoryFolderTable = ds.Tables["inventoryfolders"];
DataRow inventoryRow;
//Delete all sub-folders
foreach (InventoryFolderBase f in subFolders)
{
inventoryRow = inventoryFolderTable.Rows.Find(f.ID.ToString());
if (inventoryRow != null)
{
deleteItemsInFolder(f.ID);
inventoryRow.Delete();
}
}
//Delete the actual row
inventoryRow = inventoryFolderTable.Rows.Find(folderID.ToString());
if (inventoryRow != null)
{
deleteItemsInFolder(folderID);
inventoryRow.Delete();
}
invFoldersDa.Update(ds, "inventoryfolders");
}
}
/***********************************************************************
*
* Data Table definitions
*
**********************************************************************/
protected void CreateDataSetMapping(IDataAdapter da, string tableName)
{
ITableMapping dbMapping = da.TableMappings.Add(tableName, tableName);
foreach (DataColumn col in ds.Tables[tableName].Columns)
{
dbMapping.ColumnMappings.Add(col.ColumnName, col.ColumnName);
}
}
/// <summary>
/// Create the "inventoryitems" table
/// </summary>
private static DataTable createInventoryItemsTable()
{
DataTable inv = new DataTable("inventoryitems");
createCol(inv, "UUID", typeof (String)); //inventoryID
createCol(inv, "assetID", typeof (String));
createCol(inv, "assetType", typeof (Int32));
createCol(inv, "invType", typeof (Int32));
createCol(inv, "parentFolderID", typeof (String));
createCol(inv, "avatarID", typeof (String));
createCol(inv, "creatorsID", typeof (String));
createCol(inv, "inventoryName", typeof (String));
createCol(inv, "inventoryDescription", typeof (String));
// permissions
createCol(inv, "inventoryNextPermissions", typeof (Int32));
createCol(inv, "inventoryCurrentPermissions", typeof (Int32));
createCol(inv, "inventoryBasePermissions", typeof (Int32));
createCol(inv, "inventoryEveryOnePermissions", typeof (Int32));
createCol(inv, "inventoryGroupPermissions", typeof (Int32));
// sale info
createCol(inv, "salePrice", typeof(Int32));
createCol(inv, "saleType", typeof(Byte));
// creation date
createCol(inv, "creationDate", typeof(Int32));
// group info
createCol(inv, "groupID", typeof(String));
createCol(inv, "groupOwned", typeof(Boolean));
// Flags
createCol(inv, "flags", typeof(UInt32));
inv.PrimaryKey = new DataColumn[] { inv.Columns["UUID"] };
return inv;
}
/// <summary>
/// Creates the "inventoryfolders" table
/// </summary>
/// <returns></returns>
private static DataTable createInventoryFoldersTable()
{
DataTable fol = new DataTable("inventoryfolders");
createCol(fol, "UUID", typeof (String)); //folderID
createCol(fol, "name", typeof (String));
createCol(fol, "agentID", typeof (String));
createCol(fol, "parentID", typeof (String));
createCol(fol, "type", typeof (Int32));
createCol(fol, "version", typeof (Int32));
fol.PrimaryKey = new DataColumn[] {fol.Columns["UUID"]};
return fol;
}
/// <summary>
///
/// </summary>
/// <param name="da"></param>
/// <param name="conn"></param>
private void setupItemsCommands(SqliteDataAdapter da, SqliteConnection conn)
{
lock (ds)
{
da.InsertCommand = createInsertCommand("inventoryitems", ds.Tables["inventoryitems"]);
da.InsertCommand.Connection = conn;
da.UpdateCommand = createUpdateCommand("inventoryitems", "UUID=:UUID", ds.Tables["inventoryitems"]);
da.UpdateCommand.Connection = conn;
SqliteCommand delete = new SqliteCommand("delete from inventoryitems where UUID = :UUID");
delete.Parameters.Add(createSqliteParameter("UUID", typeof(String)));
delete.Connection = conn;
da.DeleteCommand = delete;
}
}
/// <summary>
///
/// </summary>
/// <param name="da"></param>
/// <param name="conn"></param>
private void setupFoldersCommands(SqliteDataAdapter da, SqliteConnection conn)
{
lock (ds)
{
da.InsertCommand = createInsertCommand("inventoryfolders", ds.Tables["inventoryfolders"]);
da.InsertCommand.Connection = conn;
da.UpdateCommand = createUpdateCommand("inventoryfolders", "UUID=:UUID", ds.Tables["inventoryfolders"]);
da.UpdateCommand.Connection = conn;
SqliteCommand delete = new SqliteCommand("delete from inventoryfolders where UUID = :UUID");
delete.Parameters.Add(createSqliteParameter("UUID", typeof(String)));
delete.Connection = conn;
da.DeleteCommand = delete;
}
}
/// <summary>
///
/// </summary>
/// <param name="row"></param>
/// <returns></returns>
private static InventoryFolderBase buildFolder(DataRow row)
{
InventoryFolderBase folder = new InventoryFolderBase();
folder.ID = new UUID((string) row["UUID"]);
folder.Name = (string) row["name"];
folder.Owner = new UUID((string) row["agentID"]);
folder.ParentID = new UUID((string) row["parentID"]);
folder.Type = Convert.ToInt16(row["type"]);
folder.Version = Convert.ToUInt16(row["version"]);
return folder;
}
/// <summary>
///
/// </summary>
/// <param name="row"></param>
/// <param name="folder"></param>
private static void fillFolderRow(DataRow row, InventoryFolderBase folder)
{
row["UUID"] = folder.ID.ToString();
row["name"] = folder.Name;
row["agentID"] = folder.Owner.ToString();
row["parentID"] = folder.ParentID.ToString();
row["type"] = folder.Type;
row["version"] = folder.Version;
}
/// <summary>
///
/// </summary>
/// <param name="row"></param>
/// <param name="folder"></param>
private static void moveFolderRow(DataRow row, InventoryFolderBase folder)
{
row["UUID"] = folder.ID.ToString();
row["parentID"] = folder.ParentID.ToString();
}
public List<InventoryItemBase> fetchActiveGestures (UUID avatarID)
{
lock (ds)
{
List<InventoryItemBase> items = new List<InventoryItemBase>();
DataTable inventoryItemTable = ds.Tables["inventoryitems"];
string selectExp
= "avatarID = '" + avatarID + "' AND assetType = " + (int)AssetType.Gesture + " AND flags = 1";
//m_log.DebugFormat("[SQL]: sql = " + selectExp);
DataRow[] rows = inventoryItemTable.Select(selectExp);
foreach (DataRow row in rows)
{
items.Add(buildItem(row));
}
return items;
}
}
}
}

View File

@ -44,11 +44,6 @@ using OpenSim.Data.SQLite;
namespace OpenSim.Data.Tests
{
[TestFixture(Description = "Inventory store tests (SQLite)")]
public class SQLiteInventoryTests : InventoryTests<SqliteConnection, SQLiteInventoryStore>
{
}
[TestFixture(Description = "Inventory store tests (MySQL)")]
public class MySqlInventoryTests : InventoryTests<MySqlConnection, MySQLInventoryData>
{

View File

@ -69,6 +69,8 @@ namespace OpenSim.Framework
protected WearableCacheItem[] m_cacheitems;
protected bool m_cacheItemsDirty = true;
public bool PackLegacyWearables {get; set; }
public virtual int Serial
{
get { return m_serial; }
@ -133,7 +135,7 @@ namespace OpenSim.Framework
public AvatarAppearance()
{
// m_log.WarnFormat("[AVATAR APPEARANCE]: create empty appearance");
PackLegacyWearables = false;
m_serial = 0;
SetDefaultWearables();
SetDefaultTexture();
@ -208,7 +210,10 @@ namespace OpenSim.Framework
if (copyWearables && (appearance.Wearables != null))
{
for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++)
int len = appearance.Wearables.Length;
if(len > AvatarWearable.MAX_WEARABLES)
len = AvatarWearable.MAX_WEARABLES;
for (int i = 0; i < len; i++)
SetWearable(i,appearance.Wearables[i]);
}
@ -709,8 +714,15 @@ namespace OpenSim.Framework
data["height"] = OSD.FromReal(m_avatarHeight);
// Wearables
OSDArray wears = new OSDArray(AvatarWearable.MAX_WEARABLES);
for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++)
int wearsCount;
if(PackLegacyWearables)
wearsCount = AvatarWearable.LEGACY_VERSION_MAX_WEARABLES;
else
wearsCount = AvatarWearable.MAX_WEARABLES;
OSDArray wears = new OSDArray(wearsCount);
for (int i = 0; i < wearsCount; i++)
wears.Add(m_wearables[i].Pack());
data["wearables"] = wears;
@ -760,7 +772,12 @@ namespace OpenSim.Framework
if ((data != null) && (data["wearables"] != null) && (data["wearables"]).Type == OSDType.Array)
{
OSDArray wears = (OSDArray)(data["wearables"]);
for (int i = 0; i < wears.Count; i++)
int count = wears.Count;
if (count > AvatarWearable.MAX_WEARABLES)
count = AvatarWearable.MAX_WEARABLES;
for (int i = 0; i < count; i++)
m_wearables[i] = new AvatarWearable((OSDArray)wears[i]);
}
else

View File

@ -65,7 +65,9 @@ namespace OpenSim.Framework
public static readonly int ALPHA = 13;
public static readonly int TATTOO = 14;
public static readonly int MAX_WEARABLES = 15;
public static readonly int LEGACY_VERSION_MAX_WEARABLES = 15;
public static readonly int PHYSICS = 15;
public static readonly int MAX_WEARABLES = 16;
public static readonly UUID DEFAULT_BODY_ITEM = new UUID("66c41e39-38f9-f75a-024e-585989bfaba9");
public static readonly UUID DEFAULT_BODY_ASSET = new UUID("66c41e39-38f9-f75a-024e-585989bfab73");

View File

@ -443,9 +443,18 @@ namespace OpenSim.Framework
// We might not pass this in all cases...
if ((Appearance.Wearables != null) && (Appearance.Wearables.Length > 0))
{
OSDArray wears = new OSDArray(Appearance.Wearables.Length);
foreach (AvatarWearable awear in Appearance.Wearables)
wears.Add(awear.Pack());
int wearsCount;
if(Appearance.PackLegacyWearables)
wearsCount = AvatarWearable.LEGACY_VERSION_MAX_WEARABLES;
else
wearsCount = AvatarWearable.MAX_WEARABLES;
if(wearsCount > Appearance.Wearables.Length)
wearsCount = Appearance.Wearables.Length;
OSDArray wears = new OSDArray(wearsCount);
for(int i = 0; i < wearsCount ; i++)
wears.Add(Appearance.Wearables[i].Pack());
args["wearables"] = wears;
}
@ -665,7 +674,12 @@ namespace OpenSim.Framework
if ((args["wearables"] != null) && (args["wearables"]).Type == OSDType.Array)
{
OSDArray wears = (OSDArray)(args["wearables"]);
for (int i = 0; i < wears.Count / 2; i++)
int count = wears.Count;
if (count > AvatarWearable.MAX_WEARABLES)
count = AvatarWearable.MAX_WEARABLES;
for (int i = 0; i < count / 2; i++)
{
AvatarWearable awear = new AvatarWearable((OSDArray)wears[i]);
Appearance.SetWearable(i,awear);

View File

@ -29,8 +29,8 @@ namespace OpenSim
{
public class VersionInfo
{
public const string VersionNumber = "0.8.3.0";
private const Flavour VERSION_FLAVOUR = Flavour.Dev;
public const string VersionNumber = "0.8.2.1";
private const Flavour VERSION_FLAVOUR = Flavour.Post_Fixes;
public enum Flavour
{
@ -83,8 +83,8 @@ namespace OpenSim
/// - this is an older teleport protocol used in OpenSimulator 0.7.5 and before.
/// </remarks>
public readonly static float SimulationServiceVersionAcceptedMin = 0.3f;
public readonly static float SimulationServiceVersionAcceptedMax = 0.4f;
public readonly static float SimulationServiceVersionAcceptedMax = 0.5f;
public readonly static float SimulationServiceVersionSupportedMin = 0.3f;
public readonly static float SimulationServiceVersionSupportedMax = 0.4f;
public readonly static float SimulationServiceVersionSupportedMax = 0.5f;
}
}

View File

@ -8970,8 +8970,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
return true;
}
#endregion
string mapName = Util.UTF8.GetString(map.NameData.Name, 0,
map.NameData.Name.Length - 1);
string mapName = (map.NameData.Name.Length == 0) ? m_scene.RegionInfo.RegionName :
Util.UTF8.GetString(map.NameData.Name, 0, map.NameData.Name.Length - 1);
RequestMapName handlerMapNameRequest = OnMapNameRequest;
if (handlerMapNameRequest != null)
{

View File

@ -380,7 +380,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
m_transactions.RemoveXferUploader(m_transactionID);
m_Scene.EventManager.TriggerOnNewInventoryItemUploadComplete(ourClient.AgentId, (AssetType)type, m_asset.FullID, m_asset.Name, 0);
m_Scene.EventManager.TriggerOnNewInventoryItemUploadComplete(item, 0);
}
/// <summary>

View File

@ -768,7 +768,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
AgentCircuitData agentCircuit = sp.ControllingClient.RequestClientInfo();
agentCircuit.startpos = position;
agentCircuit.child = true;
agentCircuit.Appearance = sp.Appearance;
agentCircuit.Appearance = new AvatarAppearance();
agentCircuit.Appearance.PackLegacyWearables = true;
if (currentAgentCircuit != null)
{
agentCircuit.ServiceURLs = currentAgentCircuit.ServiceURLs;
@ -805,7 +806,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
"[ENTITY TRANSFER MODULE]: Using TP V1 for {0} going from {1} to {2}",
sp.Name, Scene.Name, finalDestination.RegionName);
// Let's create an agent there if one doesn't exist yet.
// Let's create an agent there if one doesn't exist yet.
// NOTE: logout will always be false for a non-HG teleport.
bool logout = false;
if (!CreateAgent(sp, reg, finalDestination, agentCircuit, teleportFlags, out reason, out logout))
@ -906,6 +907,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
// Let's send a full update of the agent. This is a synchronous call.
AgentData agent = new AgentData();
sp.CopyTo(agent);
if (ctx.OutboundVersion < 0.5f)
agent.Appearance.PackLegacyWearables = true;
agent.Position = agentCircuit.startpos;
SetCallbackURL(agent, sp.Scene.RegionInfo);
@ -1145,6 +1148,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
// Let's send a full update of the agent.
AgentData agent = new AgentData();
sp.CopyTo(agent);
if (ctx.OutboundVersion < 0.5f)
agent.Appearance.PackLegacyWearables = true;
agent.Position = agentCircuit.startpos;
agent.SenderWantsToWaitForRoot = true;
//SetCallbackURL(agent, sp.Scene.RegionInfo);
@ -1628,7 +1633,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
m_entityTransferStateMachine.ResetFromTransit(agent.UUID);
}
if (!CrossAgentIntoNewRegionMain(agent, pos, neighbourRegion, isFlying))
if (!CrossAgentIntoNewRegionMain(agent, pos, neighbourRegion, isFlying, ctx))
{
m_log.DebugFormat("{0}: CrossAgentToNewRegionAsync: cross main failed. Resetting transfer state", LogHeader);
m_entityTransferStateMachine.ResetFromTransit(agent.UUID);
@ -1644,12 +1649,14 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
return agent;
}
public bool CrossAgentIntoNewRegionMain(ScenePresence agent, Vector3 pos, GridRegion neighbourRegion, bool isFlying)
public bool CrossAgentIntoNewRegionMain(ScenePresence agent, Vector3 pos, GridRegion neighbourRegion, bool isFlying, EntityTransferContext ctx)
{
try
{
AgentData cAgent = new AgentData();
agent.CopyTo(cAgent);
if (ctx.OutboundVersion < 0.5f)
cAgent.Appearance.PackLegacyWearables = true;
cAgent.Position = pos;
if (isFlying)
@ -1815,7 +1822,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
agent.InventoryFolder = UUID.Zero;
agent.startpos = new Vector3(128, 128, 70);
agent.child = true;
agent.Appearance = sp.Appearance;
agent.Appearance = new AvatarAppearance();
agent.Appearance.PackLegacyWearables = true;
agent.CapsPath = CapsUtil.GetRandomCapsObjectPath();
agent.ChildrenCapSeeds = new Dictionary<ulong, string>(sp.Scene.CapsModule.GetChildrenSeeds(sp.UUID));
@ -1938,7 +1946,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
agent.InventoryFolder = UUID.Zero;
agent.startpos = sp.AbsolutePosition + CalculateOffset(sp, neighbour);
agent.child = true;
agent.Appearance = sp.Appearance;
agent.Appearance = new AvatarAppearance();
agent.Appearance.PackLegacyWearables = true;
if (currentAgentCircuit != null)
{
agent.ServiceURLs = currentAgentCircuit.ServiceURLs;

View File

@ -209,7 +209,14 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
}
}
public void PostInventoryAsset(UUID avatarID, AssetType type, UUID assetID, string name, int userlevel)
private void PostInventoryAsset(InventoryItemBase item, int userlevel)
{
InventoryFolderBase f = m_Scene.InventoryService.GetFolderForType(item.Owner, FolderType.Trash);
if (f == null || (f != null && item.Folder != f.ID))
PostInventoryAsset(item.Owner, (AssetType)item.AssetType, item.AssetID, item.Name, userlevel);
}
private void PostInventoryAsset(UUID avatarID, AssetType type, UUID assetID, string name, int userlevel)
{
if (type == AssetType.Link)
return;

View File

@ -518,7 +518,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
}
// This is a hook to do some per-asset post-processing for subclasses that need that
if (remoteClient != null)
if (remoteClient != null && action != DeRezAction.Delete)
ExportAsset(remoteClient.AgentId, asset.FullID);
return item;

View File

@ -208,8 +208,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
GridRegion rinfo = m_RegionInfoCache.Get(scopeID, regionHandle, out inCache);
if (inCache)
{
m_log.DebugFormat("[REMOTE GRID CONNECTOR]: GetRegionByPosition. Found region {0} in cache. Pos=<{1},{2}>, RegionHandle={3}",
(rinfo == null) ? "<missing>" : rinfo.RegionName, regionX, regionY, (rinfo == null) ? regionHandle : rinfo.RegionHandle);
//m_log.DebugFormat("[REMOTE GRID CONNECTOR]: GetRegionByPosition. Found region {0} in cache. Pos=<{1},{2}>, RegionHandle={3}",
// (rinfo == null) ? "<missing>" : rinfo.RegionName, regionX, regionY, (rinfo == null) ? regionHandle : rinfo.RegionHandle);
return rinfo;
}
@ -219,8 +219,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
m_RegionInfoCache.Cache(rinfo);
m_log.DebugFormat("[REMOTE GRID CONNECTOR]: GetRegionByPosition. Added region {0} to the cache. Pos=<{1},{2}>, RegionHandle={3}",
(rinfo == null) ? "<missing>" : rinfo.RegionName, regionX, regionY, (rinfo == null) ? regionHandle : rinfo.RegionHandle);
//m_log.DebugFormat("[REMOTE GRID CONNECTOR]: GetRegionByPosition. Added region {0} to the cache. Pos=<{1},{2}>, RegionHandle={3}",
// (rinfo == null) ? "<missing>" : rinfo.RegionName, regionX, regionY, (rinfo == null) ? regionHandle : rinfo.RegionHandle);
return rinfo;
}

View File

@ -745,7 +745,7 @@ namespace OpenSim.Region.Framework.Scenes
public event OnIncomingSceneObjectDelegate OnIncomingSceneObject;
public delegate void OnIncomingSceneObjectDelegate(SceneObjectGroup so);
public delegate void NewInventoryItemUploadComplete(UUID avatarID, AssetType type, UUID assetID, string name, int userlevel);
public delegate void NewInventoryItemUploadComplete(InventoryItemBase item, int userlevel);
public event NewInventoryItemUploadComplete OnNewInventoryItemUploadComplete;
@ -2208,7 +2208,7 @@ namespace OpenSim.Region.Framework.Scenes
}
}
public void TriggerOnNewInventoryItemUploadComplete(UUID agentID, AssetType type, UUID AssetID, String AssetName, int userlevel)
public void TriggerOnNewInventoryItemUploadComplete(InventoryItemBase item, int userlevel)
{
NewInventoryItemUploadComplete handlerNewInventoryItemUpdateComplete = OnNewInventoryItemUploadComplete;
if (handlerNewInventoryItemUpdateComplete != null)
@ -2217,7 +2217,7 @@ namespace OpenSim.Region.Framework.Scenes
{
try
{
d(agentID, type, AssetID, AssetName, userlevel);
d(item, userlevel);
}
catch (Exception e)
{

View File

@ -149,7 +149,7 @@ namespace OpenSim.Region.Framework.Scenes
userlevel = 1;
}
if (trigger)
EventManager.TriggerOnNewInventoryItemUploadComplete(item.Owner, (AssetType)item.AssetType, item.AssetID, item.Name, userlevel);
EventManager.TriggerOnNewInventoryItemUploadComplete(item, userlevel);
return true;
}
@ -191,7 +191,7 @@ namespace OpenSim.Region.Framework.Scenes
userlevel = 1;
}
if (trigger)
EventManager.TriggerOnNewInventoryItemUploadComplete(item.Owner, (AssetType)item.AssetType, item.AssetID, item.Name, userlevel);
EventManager.TriggerOnNewInventoryItemUploadComplete(item, userlevel);
if (originalFolder != UUID.Zero)
{

View File

@ -232,6 +232,12 @@ namespace OpenSim.Region.Framework.Scenes
/// </summary>
public bool AllowAvatarCrossing { get; set; }
/// <summary>
/// When placed outside the region's border, do we transfer the objects or
/// do we keep simulating them here?
/// </summary>
public bool DisableObjectTransfer { get; set; }
public bool m_useFlySlow;
public bool m_useTrashOnDelete = true;
@ -1131,6 +1137,7 @@ namespace OpenSim.Region.Framework.Scenes
if (entityTransferConfig != null)
{
AllowAvatarCrossing = entityTransferConfig.GetBoolean("AllowAvatarCrossing", AllowAvatarCrossing);
DisableObjectTransfer = entityTransferConfig.GetBoolean("DisableObjectTransfer", false);
}
#region Interest Management

View File

@ -473,7 +473,8 @@ namespace OpenSim.Region.Framework.Scenes
if (
!Scene.PositionIsInCurrentRegion(val)
&& !IsAttachmentCheckFull()
&& (!Scene.LoadingPrims)
&& (!Scene.LoadingPrims)
&& !Scene.DisableObjectTransfer
)
{
IEntityTransferModule entityTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>();

View File

@ -70,6 +70,36 @@ namespace OpenSim.Tools.Configger
List<string> sources = new List<string>();
string masterFileName = startupConfig.GetString("inimaster", "OpenSimDefaults.ini");
if (masterFileName == "none")
masterFileName = String.Empty;
if (IsUri(masterFileName))
{
if (!sources.Contains(masterFileName))
sources.Add(masterFileName);
}
else
{
string masterFilePath = Path.GetFullPath(
Path.Combine(Util.configDir(), masterFileName));
if (masterFileName != String.Empty)
{
if (File.Exists(masterFilePath))
{
if (!sources.Contains(masterFilePath))
sources.Add(masterFilePath);
}
else
{
m_log.ErrorFormat("Master ini file {0} not found", Path.GetFullPath(masterFilePath));
Environment.Exit(1);
}
}
}
string iniFileName = startupConfig.GetString("inifile", Path.Combine(".", "OpenSim.ini"));
if (IsUri(iniFileName))

View File

@ -102,5 +102,11 @@ namespace OpenSim.Tools.Configger
return found.ToArray();
}
public static string configDir()
{
return ".";
}
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -775,6 +775,10 @@
; Allow avatars to cross into and out of the region.
AllowAvatarCrossing = true
; This disables border transfers for objects. When true, objects can be placed outside
; the region's border without being transferred to another simulator.
DisableObjectTransfer = false
; Minimum user level required for HyperGrid teleports
LevelHGTeleport = 0

Binary file not shown.