aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/NHibernate/Resources
diff options
context:
space:
mode:
authorCharles Krinke2009-01-11 18:24:16 +0000
committerCharles Krinke2009-01-11 18:24:16 +0000
commit40f34aeffd64e2aa81cecb2e861f60d6e8886198 (patch)
tree5d0059eb7aa70799c8239bb273efc997138cabb5 /OpenSim/Data/NHibernate/Resources
parentThank you kindly, Tlaukkan (Tommil) for a patch that: (diff)
downloadopensim-SC-40f34aeffd64e2aa81cecb2e861f60d6e8886198.zip
opensim-SC-40f34aeffd64e2aa81cecb2e861f60d6e8886198.tar.gz
opensim-SC-40f34aeffd64e2aa81cecb2e861f60d6e8886198.tar.bz2
opensim-SC-40f34aeffd64e2aa81cecb2e861f60d6e8886198.tar.xz
Thank you kindly, Tlaukkan (Tommil) for a patch that:
Fixed all NHibernate unit tests by implementing missing persistency methods, tables, columns and fixing bugs in the existing implementation. Two minor changes to classes outside NHibernate module: Added Scene instantiation for SceneObjectGroup in OpenSim.Data.Tests.BasicRegionTest as this was required by the NHibernate persistency. In the process added also mock constructor to Scene which only populates RegionInfo in the scene which is used by ScenePart.RegionUUID. NHibernate module is still in experimental state and has not been tested at opensim region or ugaim runtime configuration. Adding unit tests to build is not yet advisable nor using NHibernate module in any production setup.
Diffstat (limited to 'OpenSim/Data/NHibernate/Resources')
-rw-r--r--OpenSim/Data/NHibernate/Resources/MySQLDialect/001_RegionStore.sql80
-rw-r--r--OpenSim/Data/NHibernate/Resources/MySQLDialect/001_UserStore.sql102
-rw-r--r--OpenSim/Data/NHibernate/Resources/MySQLDialect/003_RegionStore.sql72
-rw-r--r--OpenSim/Data/NHibernate/Resources/RegionSettings.hbm.xml56
-rw-r--r--OpenSim/Data/NHibernate/Resources/RegionStore.hbm.xml12
-rw-r--r--OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_RegionStore.sql60
-rw-r--r--OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_UserStore.sql39
-rw-r--r--OpenSim/Data/NHibernate/Resources/UserAgentData.hbm.xml17
-rw-r--r--OpenSim/Data/NHibernate/Resources/UserAppearance.hbm.xml1
-rw-r--r--OpenSim/Data/NHibernate/Resources/UserFriend.hbm.xml11
-rw-r--r--OpenSim/Data/NHibernate/Resources/UserProfileData.hbm.xml16
11 files changed, 360 insertions, 106 deletions
diff --git a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_RegionStore.sql b/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_RegionStore.sql
index 99a5227..158ebb4 100644
--- a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_RegionStore.sql
+++ b/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_RegionStore.sql
@@ -1,8 +1,15 @@
1CREATE TABLE `Prims` ( 1CREATE TABLE `Prims` (
2 `UUID` char(36) NOT NULL default '',
3 `RegionID` char(36) default NULL,
4 `GroupID` char(36) default NULL,
2 `ParentID` int(11) default NULL, 5 `ParentID` int(11) default NULL,
6 `ParentUUID` char(36) default NULL,
7 `OwnerID` char(36) default NULL,
8 `LastOwnerID` char(36) default NULL,
9 `CreatorID` char(36) default NULL,
3 `CreationDate` int(11) default NULL, 10 `CreationDate` int(11) default NULL,
11 `LinkNum` int(11) default NULL,
4 `Name` varchar(255) default NULL, 12 `Name` varchar(255) default NULL,
5 `ParentUUID` char(36) default NULL,
6 `Text` varchar(255) default NULL, 13 `Text` varchar(255) default NULL,
7 `Description` varchar(255) default NULL, 14 `Description` varchar(255) default NULL,
8 `SitName` varchar(255) default NULL, 15 `SitName` varchar(255) default NULL,
@@ -13,43 +20,43 @@ CREATE TABLE `Prims` (
13 `GroupMask` int(11) default NULL, 20 `GroupMask` int(11) default NULL,
14 `EveryoneMask` int(11) default NULL, 21 `EveryoneMask` int(11) default NULL,
15 `BaseMask` int(11) default NULL, 22 `BaseMask` int(11) default NULL,
16 `PositionX` float default NULL, 23 `Material` int(1) default NULL,
17 `PositionY` float default NULL, 24 `ScriptAccessPin` int(11) default NULL,
18 `PositionZ` float default NULL, 25 `TextureAnimation` blob,
19 `GroupPositionX` float default NULL, 26 `ParticleSystem` blob,
20 `GroupPositionY` float default NULL, 27 `ClickAction` int(1) default NULL,
21 `GroupPositionZ` float default NULL, 28 `Color` int(11) default NULL,
22 `VelocityX` float default NULL, 29 `PositionX` double default NULL,
23 `VelocityY` float default NULL, 30 `PositionY` double default NULL,
24 `VelocityZ` float default NULL, 31 `PositionZ` double default NULL,
25 `AngularVelocityX` float default NULL, 32 `GroupPositionX` double default NULL,
26 `AngularVelocityY` float default NULL, 33 `GroupPositionY` double default NULL,
27 `AngularVelocityZ` float default NULL, 34 `GroupPositionZ` double default NULL,
28 `AccelerationX` float default NULL, 35 `VelocityX` double default NULL,
29 `AccelerationY` float default NULL, 36 `VelocityY` double default NULL,
30 `AccelerationZ` float default NULL, 37 `VelocityZ` double default NULL,
31 `RotationX` float default NULL, 38 `AngularVelocityX` double default NULL,
32 `RotationY` float default NULL, 39 `AngularVelocityY` double default NULL,
33 `RotationZ` float default NULL, 40 `AngularVelocityZ` double default NULL,
34 `RotationW` float default NULL, 41 `AccelerationX` double default NULL,
35 `SitTargetOffsetX` float default NULL, 42 `AccelerationY` double default NULL,
36 `SitTargetOffsetY` float default NULL, 43 `AccelerationZ` double default NULL,
37 `SitTargetOffsetZ` float default NULL, 44 `RotationX` double default NULL,
38 `SitTargetOrientW` float default NULL, 45 `RotationY` double default NULL,
39 `SitTargetOrientX` float default NULL, 46 `RotationZ` double default NULL,
40 `SitTargetOrientY` float default NULL, 47 `RotationW` double default NULL,
41 `SitTargetOrientZ` float default NULL, 48 `SitTargetOffsetX` double default NULL,
42 `UUID` char(36) NOT NULL default '', 49 `SitTargetOffsetY` double default NULL,
43 `RegionID` char(36) default NULL, 50 `SitTargetOffsetZ` double default NULL,
44 `CreatorID` char(36) default NULL, 51 `SitTargetOrientW` double default NULL,
45 `OwnerID` char(36) default NULL, 52 `SitTargetOrientX` double default NULL,
46 `GroupID` char(36) default NULL, 53 `SitTargetOrientY` double default NULL,
47 `LastOwnerID` char(36) default NULL, 54 `SitTargetOrientZ` double default NULL,
48 -- this is the shape 55 -- this is the shape
49 `Shape` int(11) default NULL, 56 `Shape` int(11) default NULL,
50 `ScaleX` float default NULL, 57 `ScaleX` double default NULL,
51 `ScaleY` float default NULL, 58 `ScaleY` double default NULL,
52 `ScaleZ` float default NULL, 59 `ScaleZ` double default NULL,
53 `PCode` int(11) default NULL, 60 `PCode` int(11) default NULL,
54 `PathBegin` int(11) default NULL, 61 `PathBegin` int(11) default NULL,
55 `PathEnd` int(11) default NULL, 62 `PathEnd` int(11) default NULL,
@@ -77,3 +84,4 @@ CREATE TABLE `Prims` (
77 KEY `prims_parentuuid` (`ParentUUID`) 84 KEY `prims_parentuuid` (`ParentUUID`)
78) ENGINE=InnoDB DEFAULT CHARSET=utf8; 85) ENGINE=InnoDB DEFAULT CHARSET=utf8;
79 86
87
diff --git a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_UserStore.sql b/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_UserStore.sql
index 5db5d29..a66f5b8 100644
--- a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_UserStore.sql
+++ b/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_UserStore.sql
@@ -1,12 +1,12 @@
1START TRANSACTION; 1START TRANSACTION;
2 2
3CREATE TABLE `UserAgents` ( 3CREATE TABLE `UserAgents` (
4 `ProfileID` varchar(255) NOT NULL, 4 `ProfileID` varchar(36) NOT NULL,
5 `AgentIP` varchar(24) default NULL, 5 `AgentIP` varchar(24) default NULL,
6 `AgentPort` int(11) default NULL, 6 `AgentPort` int(11) default NULL,
7 `AgentOnline` tinyint(1) default NULL, 7 `AgentOnline` tinyint(1) default NULL,
8 `SessionID` varchar(255) default NULL, 8 `SessionID` varchar(36) default NULL,
9 `SecureSessionID` varchar(255) default NULL, 9 `SecureSessionID` varchar(36) default NULL,
10 `InitialRegion` varchar(255) default NULL, 10 `InitialRegion` varchar(255) default NULL,
11 `Region` varchar(255) default NULL, 11 `Region` varchar(255) default NULL,
12 `LoginTime` int(11) default NULL, 12 `LoginTime` int(11) default NULL,
@@ -15,16 +15,21 @@ CREATE TABLE `UserAgents` (
15 `PositionX` float default NULL, 15 `PositionX` float default NULL,
16 `PositionY` float default NULL, 16 `PositionY` float default NULL,
17 `PositionZ` float default NULL, 17 `PositionZ` float default NULL,
18 `LookAtX` float default NULL,
19 `LookAtY` float default NULL,
20 `LookAtZ` float default NULL,
18 PRIMARY KEY (`ProfileID`) 21 PRIMARY KEY (`ProfileID`)
19) ENGINE=InnoDB DEFAULT CHARSET=utf8; 22) ENGINE=InnoDB DEFAULT CHARSET=utf8;
20 23
21CREATE TABLE `UserProfiles` ( 24CREATE TABLE `UserProfiles` (
22 `ID` varchar(255) NOT NULL, 25 `ID` varchar(36) NOT NULL,
26 `WebLoginKey` varchar(36) default NULL,
23 `FirstName` varchar(32) default NULL, 27 `FirstName` varchar(32) default NULL,
24 `SurName` varchar(32) default NULL, 28 `SurName` varchar(32) default NULL,
29 `Email` varchar(250) default NULL,
25 `PasswordHash` varchar(32) default NULL, 30 `PasswordHash` varchar(32) default NULL,
26 `PasswordSalt` varchar(32) default NULL, 31 `PasswordSalt` varchar(32) default NULL,
27 `WebLoginKey` varchar(255) default NULL, 32 `HomeRegionID` varchar(36) default NULL,
28 `HomeRegionX` int(11) default NULL, 33 `HomeRegionX` int(11) default NULL,
29 `HomeRegionY` int(11) default NULL, 34 `HomeRegionY` int(11) default NULL,
30 `HomeLocationX` float default NULL, 35 `HomeLocationX` float default NULL,
@@ -35,50 +40,67 @@ CREATE TABLE `UserProfiles` (
35 `HomeLookAtZ` float default NULL, 40 `HomeLookAtZ` float default NULL,
36 `Created` int(11) default NULL, 41 `Created` int(11) default NULL,
37 `LastLogin` int(11) default NULL, 42 `LastLogin` int(11) default NULL,
38 `RootInventoryFolderID` varchar(255) default NULL,
39 `UserInventoryURI` varchar(255) default NULL, 43 `UserInventoryURI` varchar(255) default NULL,
40 `UserAssetURI` varchar(255) default NULL, 44 `UserAssetURI` varchar(255) default NULL,
41 `Image` varchar(255) default NULL, 45 `Image` varchar(36) default NULL,
42 `FirstLifeImage` varchar(255) default NULL, 46 `FirstLifeImage` varchar(36) default NULL,
43 `AboutText` varchar(255) default NULL, 47 `AboutText` text default NULL,
44 `FirstLifeAboutText` varchar(255) default NULL, 48 `FirstLifeAboutText` text default NULL,
49 `CanDoMask` int(11) default NULL,
50 `WantDoMask` int(11) default NULL,
51 `UserFlags` int(11) default NULL,
52 `GodLevel` int(11) default NULL,
53 `CustomType` varchar(32) default NULL,
54 `Partner` varchar(36) default NULL,
55 `RootInventoryFolderID` varchar(36) default NULL,
45 PRIMARY KEY (`ID`), 56 PRIMARY KEY (`ID`),
46 KEY `user_surname` (`SurName`), 57 INDEX `UserSurnameIndex` (`SurName`),
47 KEY `user_firstname` (`FirstName`) 58 INDEX `UserFirstNameIndex` (`FirstName`),
59 UNIQUE INDEX `UserFullNameIndex` (`SurName`,`FirstName`)
48) ENGINE=InnoDB DEFAULT CHARSET=utf8; 60) ENGINE=InnoDB DEFAULT CHARSET=utf8;
49 61
50CREATE TABLE `UserAppearances` ( 62CREATE TABLE `UserAppearances` (
51 `Owner` varchar(255) NOT NULL, 63 `Owner` varchar(36) NOT NULL,
52 `BodyItem` varchar(255) default NULL, 64 `BodyItem` varchar(36) default NULL,
53 `BodyAsset` varchar(255) default NULL, 65 `BodyAsset` varchar(36) default NULL,
54 `SkinItem` varchar(255) default NULL, 66 `SkinItem` varchar(36) default NULL,
55 `SkinAsset` varchar(255) default NULL, 67 `SkinAsset` varchar(36) default NULL,
56 `HairItem` varchar(255) default NULL, 68 `HairItem` varchar(36) default NULL,
57 `HairAsset` varchar(255) default NULL, 69 `HairAsset` varchar(36) default NULL,
58 `EyesItem` varchar(255) default NULL, 70 `EyesItem` varchar(36) default NULL,
59 `EyesAsset` varchar(255) default NULL, 71 `EyesAsset` varchar(36) default NULL,
60 `ShirtItem` varchar(255) default NULL, 72 `ShirtItem` varchar(36) default NULL,
61 `ShirtAsset` varchar(255) default NULL, 73 `ShirtAsset` varchar(36) default NULL,
62 `PantsItem` varchar(255) default NULL, 74 `PantsItem` varchar(36) default NULL,
63 `PantsAsset` varchar(255) default NULL, 75 `PantsAsset` varchar(36) default NULL,
64 `ShoesItem` varchar(255) default NULL, 76 `ShoesItem` varchar(36) default NULL,
65 `ShoesAsset` varchar(255) default NULL, 77 `ShoesAsset` varchar(36) default NULL,
66 `SocksItem` varchar(255) default NULL, 78 `SocksItem` varchar(36) default NULL,
67 `SocksAsset` varchar(255) default NULL, 79 `SocksAsset` varchar(36) default NULL,
68 `JacketItem` varchar(255) default NULL, 80 `JacketItem` varchar(36) default NULL,
69 `JacketAsset` varchar(255) default NULL, 81 `JacketAsset` varchar(36) default NULL,
70 `GlovesItem` varchar(255) default NULL, 82 `GlovesItem` varchar(36) default NULL,
71 `GlovesAsset` varchar(255) default NULL, 83 `GlovesAsset` varchar(36) default NULL,
72 `UnderShirtItem` varchar(255) default NULL, 84 `UnderShirtItem` varchar(36) default NULL,
73 `UnderShirtAsset` varchar(255) default NULL, 85 `UnderShirtAsset` varchar(36) default NULL,
74 `UnderPantsItem` varchar(255) default NULL, 86 `UnderPantsItem` varchar(36) default NULL,
75 `UnderPantsAsset` varchar(255) default NULL, 87 `UnderPantsAsset` varchar(36) default NULL,
76 `SkirtItem` varchar(255) default NULL, 88 `SkirtItem` varchar(36) default NULL,
77 `SkirtAsset` varchar(255) default NULL, 89 `SkirtAsset` varchar(36) default NULL,
78 `Texture` longblob, 90 `Texture` longblob,
79 `VisualParams` longblob, 91 `VisualParams` longblob,
80 `Serial` int(11) default NULL, 92 `Serial` int(11) default NULL,
93 `AvatarHeight` float default NULL,
81 PRIMARY KEY (`Owner`) 94 PRIMARY KEY (`Owner`)
82) ENGINE=InnoDB DEFAULT CHARSET=utf8; 95) ENGINE=InnoDB DEFAULT CHARSET=utf8;
83 96
84COMMIT; \ No newline at end of file 97CREATE TABLE `UserFriends` (
98 `UserFriendID` VARCHAR(36) NOT NULL,
99 `OwnerID` VARCHAR(36) NOT NULL,
100 `FriendID` VARCHAR(36) NOT NULL,
101 `FriendPermissions` INT(11) NOT NULL,
102 PRIMARY KEY (`UserFriendID`),
103 UNIQUE INDEX (`OwnerID`,`FriendID`)
104) ENGINE=InnoDB DEFAULT CHARSET=utf8;
105
106COMMIT;
diff --git a/OpenSim/Data/NHibernate/Resources/MySQLDialect/003_RegionStore.sql b/OpenSim/Data/NHibernate/Resources/MySQLDialect/003_RegionStore.sql
index 230e93c..e30287b 100644
--- a/OpenSim/Data/NHibernate/Resources/MySQLDialect/003_RegionStore.sql
+++ b/OpenSim/Data/NHibernate/Resources/MySQLDialect/003_RegionStore.sql
@@ -1,26 +1,78 @@
1BEGIN; 1BEGIN;
2 2
3CREATE TABLE `PrimItems` ( 3CREATE TABLE `PrimItems` (
4 `ItemID` char(36) NOT NULL default '',
5 `GroupID` char(36) default NULL,
6 `PrimID` char(36) default NULL,
7 `ParentFolderID` char(36) default NULL,
8 `AssetID` char(36) default NULL,
9 `OwnerID` char(36) default NULL,
10 `LastOwnerID` char(36) default NULL,
11 `CreatorID` char(36) default NULL,
12 `CreationDate` bigint(20) default NULL,
4 `InvType` int(11) default NULL, 13 `InvType` int(11) default NULL,
5 `Name` varchar(255) default NULL, 14 `Name` varchar(255) default NULL,
6 `Description` varchar(255) default NULL, 15 `Description` varchar(255) default NULL,
7 `CreationDate` bigint(20) default NULL,
8 `NextPermissions` int(11) default NULL, 16 `NextPermissions` int(11) default NULL,
9 `CurrentPermissions` int(11) default NULL, 17 `CurrentPermissions` int(11) default NULL,
10 `BasePermissions` int(11) default NULL, 18 `BasePermissions` int(11) default NULL,
11 `EveryonePermissions` int(11) default NULL, 19 `EveryonePermissions` int(11) default NULL,
12 `GroupPermissions` int(11) default NULL, 20 `GroupPermissions` int(11) default NULL,
13 `Flags` int(11) NOT NULL default '0', 21 `Flags` int(11) NOT NULL default '0',
14 `ItemID` char(36) NOT NULL default '',
15 `PrimID` char(36) default NULL,
16 `AssetID` char(36) default NULL,
17 `ParentFolderID` char(36) default NULL,
18 `CreatorID` char(36) default NULL,
19 `OwnerID` char(36) default NULL,
20 `GroupID` char(36) default NULL,
21 `LastOwnerID` char(36) default NULL,
22 PRIMARY KEY (`ItemID`), 22 PRIMARY KEY (`ItemID`),
23 KEY `primitems_primid` (`PrimID`) 23 KEY `primitems_primid` (`PrimID`)
24) ENGINE=InnoDB DEFAULT CHARSET=utf8; 24) ENGINE=InnoDB DEFAULT CHARSET=utf8;
25 25
26COMMIT; \ No newline at end of file 26CREATE TABLE RegionSettings (
27 `RegionID` char(36) default NULL,
28
29 `BlockTerraform` bit(1) default NULL,
30 `BlockFly` bit(1) default NULL,
31 `AllowDamage` bit(1) default NULL,
32 `RestrictPushing` bit(1) default NULL,
33 `AllowLandResell` bit(1) default NULL,
34 `AllowLandJoinDivide` bit(1) default NULL,
35 `BlockShowInSearch` bit(1) default NULL,
36
37 `AgentLimit` int(11) default NULL,
38 `ObjectBonus` double default NULL,
39 `Maturity` int(11) default NULL,
40
41 `DisableScripts` bit(1) default NULL,
42 `DisableCollisions` bit(1) default NULL,
43 `DisablePhysics` bit(1) default NULL,
44
45 `TerrainTexture1` char(36) default NULL,
46 `TerrainTexture2` char(36) default NULL,
47 `TerrainTexture3` char(36) default NULL,
48 `TerrainTexture4` char(36) default NULL,
49
50 `Elevation1NW` double default NULL,
51 `Elevation2NW` double default NULL,
52 `Elevation1NE` double default NULL,
53 `Elevation2NE` double default NULL,
54 `Elevation1SE` double default NULL,
55 `Elevation2SE` double default NULL,
56 `Elevation1SW` double default NULL,
57 `Elevation2SW` double default NULL,
58
59 `WaterHeight` double default NULL,
60 `TerrainRaiseLimit` double default NULL,
61 `TerrainLowerLimit` double default NULL,
62
63 `UseEstateSun` bit(1) default NULL,
64 `Sandbox` bit(1) default NULL,
65
66 `SunVectorX` double default NULL,
67 `SunVectorY` double default NULL,
68 `SunVectorZ` double default NULL,
69
70 `FixedSun` bit(1) default NULL,
71 `SunPosition` double default NULL,
72
73 `Covenant` char(36) default NULL,
74
75 PRIMARY KEY (RegionID)
76) ENGINE=InnoDB DEFAULT CHARSET=utf8;
77
78COMMIT;
diff --git a/OpenSim/Data/NHibernate/Resources/RegionSettings.hbm.xml b/OpenSim/Data/NHibernate/Resources/RegionSettings.hbm.xml
new file mode 100644
index 0000000..5cfccba
--- /dev/null
+++ b/OpenSim/Data/NHibernate/Resources/RegionSettings.hbm.xml
@@ -0,0 +1,56 @@
1<?xml version="1.0" encoding="utf-8" ?>
2<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
3 <class name="OpenSim.Framework.RegionSettings, OpenSim.Framework" table="RegionSettings" lazy="false">
4 <id name="RegionUUID" column="RegionId" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
5 <generator class="assigned" />
6 </id>
7
8 <property name="BlockTerraform" type="System.Boolean" />
9 <property name="BlockFly" type="System.Boolean" />
10 <property name="AllowDamage" type="System.Boolean" />
11 <property name="RestrictPushing" type="System.Boolean" />
12 <property name="AllowLandResell" type="System.Boolean" />
13 <property name="AllowLandJoinDivide" type="System.Boolean" />
14 <property name="BlockShowInSearch" type="System.Boolean" />
15
16 <property name="AgentLimit" type="System.Int32" />
17 <property name="ObjectBonus" type="System.Double" />
18 <property name="Maturity" type="System.Int32" />
19
20 <property name="DisableScripts" type="System.Boolean" />
21 <property name="DisableCollisions" type="System.Boolean" />
22 <property name="DisablePhysics" type="System.Boolean" />
23
24 <property name="TerrainTexture1" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
25 <property name="TerrainTexture2" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
26 <property name="TerrainTexture3" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
27 <property name="TerrainTexture4" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
28
29 <property name="Elevation1NW" type="System.Double" />
30 <property name="Elevation2NW" type="System.Double" />
31 <property name="Elevation1NE" type="System.Double" />
32 <property name="Elevation2NE" type="System.Double" />
33 <property name="Elevation1SE" type="System.Double" />
34 <property name="Elevation2SE" type="System.Double" />
35 <property name="Elevation1SW" type="System.Double" />
36 <property name="Elevation2SW" type="System.Double" />
37
38 <property name="WaterHeight" type="System.Double" />
39 <property name="TerrainRaiseLimit" type="System.Double" />
40 <property name="TerrainLowerLimit" type="System.Double" />
41
42 <property name="UseEstateSun" type="System.Boolean" />
43 <property name="Sandbox" type="System.Boolean" />
44
45 <property name="SunVector" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
46 <column name="SunVectorX" />
47 <column name="SunVectorY" />
48 <column name="SunVectorZ" />
49 </property>
50
51 <property name="FixedSun" type="System.Boolean" />
52 <property name="SunPosition" type="System.Double" />
53 <property name="Covenant" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
54
55 </class>
56</hibernate-mapping>
diff --git a/OpenSim/Data/NHibernate/Resources/RegionStore.hbm.xml b/OpenSim/Data/NHibernate/Resources/RegionStore.hbm.xml
index 1851904..3144b0b 100644
--- a/OpenSim/Data/NHibernate/Resources/RegionStore.hbm.xml
+++ b/OpenSim/Data/NHibernate/Resources/RegionStore.hbm.xml
@@ -13,12 +13,14 @@
13 <property name="Description" type="String" length="255" /> 13 <property name="Description" type="String" length="255" />
14 <property name="SitName" type="String" length="255" /> 14 <property name="SitName" type="String" length="255" />
15 <property name="TouchName" type="String" length="255" /> 15 <property name="TouchName" type="String" length="255" />
16 16 <property name="Color" type="OpenSim.Data.NHibernate.ColorUserType, OpenSim.Data.NHibernate" />
17
17 <property name="ObjectFlags" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" /> 18 <property name="ObjectFlags" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
18 <property name="CreatorID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" /> 19 <property name="CreatorID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
19 <property name="OwnerID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" /> 20 <property name="OwnerID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
20 <property name="GroupID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" /> 21 <property name="GroupID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
21 <property name="LastOwnerID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" /> 22 <property name="LastOwnerID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
23 <property name="LinkNum" type="System.Int32" />
22 24
23 <property name="OwnerMask" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" /> 25 <property name="OwnerMask" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
24 <property name="NextOwnerMask" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" /> 26 <property name="NextOwnerMask" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
@@ -26,6 +28,12 @@
26 <property name="EveryoneMask" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" /> 28 <property name="EveryoneMask" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
27 <property name="BaseMask" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" /> 29 <property name="BaseMask" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
28 30
31 <property name="Material" type="Byte" />
32 <property name="ScriptAccessPin" type="System.Int32" />
33 <property name="TextureAnimation" type="binary" />
34 <property name="ParticleSystem" type="binary" />
35 <property name="ClickAction" type="Byte" />
36
29 <property name="OffsetPosition" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" > 37 <property name="OffsetPosition" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
30 <column name="PositionX" /> 38 <column name="PositionX" />
31 <column name="PositionY" /> 39 <column name="PositionY" />
diff --git a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_RegionStore.sql b/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_RegionStore.sql
index d557b9a..eaa0964 100644
--- a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_RegionStore.sql
+++ b/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_RegionStore.sql
@@ -2,25 +2,32 @@ BEGIN TRANSACTION;
2 2
3create table Prims ( 3create table Prims (
4 UUID TEXT not null, 4 UUID TEXT not null,
5 RegionID TEXT,
6 GroupID TEXT,
5 ParentID INTEGER, 7 ParentID INTEGER,
6 ParentUUID TEXT, 8 ParentUUID TEXT,
7 RegionID TEXT, 9 OwnerID TEXT,
10 LastOwnerID TEXT,
11 CreatorID TEXT,
8 CreationDate INTEGER, 12 CreationDate INTEGER,
13 LinkNum INTEGER,
9 Name TEXT, 14 Name TEXT,
10 Text TEXT, 15 Text TEXT,
11 Description TEXT, 16 Description TEXT,
12 SitName TEXT, 17 SitName TEXT,
13 TouchName TEXT, 18 TouchName TEXT,
14 ObjectFlags INTEGER, 19 ObjectFlags INTEGER,
15 CreatorID TEXT,
16 OwnerID TEXT,
17 GroupID TEXT,
18 LastOwnerID TEXT,
19 OwnerMask INTEGER, 20 OwnerMask INTEGER,
20 NextOwnerMask INTEGER, 21 NextOwnerMask INTEGER,
21 GroupMask INTEGER, 22 GroupMask INTEGER,
22 EveryoneMask INTEGER, 23 EveryoneMask INTEGER,
23 BaseMask INTEGER, 24 BaseMask INTEGER,
25 Material INTEGER,
26 ScriptAccessPin INTEGER,
27 TextureAnimation BLOB,
28 ParticleSystem BLOB,
29 ClickAction INTEGER,
30 Color INTEGER,
24 PositionX NUMERIC, 31 PositionX NUMERIC,
25 PositionY NUMERIC, 32 PositionY NUMERIC,
26 PositionZ NUMERIC, 33 PositionZ NUMERIC,
@@ -99,4 +106,45 @@ create table PrimItems (
99 primary key (ItemID) 106 primary key (ItemID)
100); 107);
101 108
102COMMIT; \ No newline at end of file 109CREATE TABLE RegionSettings (
110 RegionID TEXT not null,
111 BlockTerraform BIT,
112 BlockFly BIT,
113 AllowDamage BIT,
114 RestrictPushing BIT,
115 AllowLandResell BIT,
116 AllowLandJoinDivide BIT,
117 BlockShowInSearch BIT,
118 AgentLimit INTEGER,
119 ObjectBonus NUMERIC,
120 Maturity INTEGER,
121 DisableScripts BIT,
122 DisableCollisions BIT,
123 DisablePhysics BIT,
124 TerrainTexture1 TEXT,
125 TerrainTexture2 TEXT,
126 TerrainTexture3 TEXT,
127 TerrainTexture4 TEXT,
128 Elevation1NW NUMERIC,
129 Elevation2NW NUMERIC,
130 Elevation1NE NUMERIC,
131 Elevation2NE NUMERIC,
132 Elevation1SE NUMERIC,
133 Elevation2SE NUMERIC,
134 Elevation1SW NUMERIC,
135 Elevation2SW NUMERIC,
136 WaterHeight NUMERIC,
137 TerrainRaiseLimit NUMERIC,
138 TerrainLowerLimit NUMERIC,
139 UseEstateSun BIT,
140 Sandbox BIT,
141 SunVectorX NUMERIC,
142 SunVectorY NUMERIC,
143 SunVectorZ NUMERIC,
144 FixedSun BIT,
145 SunPosition NUMERIC,
146 Covenant TEXT,
147 primary key (RegionID)
148);
149
150COMMIT;
diff --git a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_UserStore.sql b/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_UserStore.sql
index 8d1ba5c..c5e42d5 100644
--- a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_UserStore.sql
+++ b/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_UserStore.sql
@@ -12,15 +12,24 @@ create table UserAgents (
12 LoginTime INTEGER, 12 LoginTime INTEGER,
13 LogoutTime INTEGER, 13 LogoutTime INTEGER,
14 Handle INTEGER, 14 Handle INTEGER,
15 PositionX NUMERIC,
16 PositionY NUMERIC,
17 PositionZ NUMERIC,
18 LookAtX NUMERIC,
19 LookAtY NUMERIC,
20 LookAtZ NUMERIC,
15 primary key (ProfileID) 21 primary key (ProfileID)
16); 22);
23
17create table UserProfiles ( 24create table UserProfiles (
18 ID TEXT not null, 25 ID TEXT not null,
26 WebLoginKey TEXT,
19 FirstName TEXT, 27 FirstName TEXT,
20 SurName TEXT, 28 SurName TEXT,
29 Email TEXT,
21 PasswordHash TEXT, 30 PasswordHash TEXT,
22 PasswordSalt TEXT, 31 PasswordSalt TEXT,
23 WebLoginKey TEXT, 32 HomeRegionID TEXT,
24 HomeRegionX INTEGER, 33 HomeRegionX INTEGER,
25 HomeRegionY INTEGER, 34 HomeRegionY INTEGER,
26 HomeLocationX NUMERIC, 35 HomeLocationX NUMERIC,
@@ -31,15 +40,22 @@ create table UserProfiles (
31 HomeLookAtZ NUMERIC, 40 HomeLookAtZ NUMERIC,
32 Created INTEGER, 41 Created INTEGER,
33 LastLogin INTEGER, 42 LastLogin INTEGER,
34 RootInventoryFolderID TEXT,
35 UserInventoryURI TEXT, 43 UserInventoryURI TEXT,
36 UserAssetURI TEXT, 44 UserAssetURI TEXT,
37 Image TEXT, 45 Image TEXT,
38 FirstLifeImage TEXT, 46 FirstLifeImage TEXT,
39 AboutText TEXT, 47 AboutText TEXT,
40 FirstLifeAboutText TEXT, 48 FirstLifeAboutText TEXT,
49 RootInventoryFolderID TEXT,
50 `CanDoMask` INTEGER,
51 `WantDoMask` INTEGER,
52 `UserFlags` INTEGER,
53 `GodLevel` INTEGER,
54 `CustomType` TEXT,
55 `Partner` TEXT,
41 primary key (ID) 56 primary key (ID)
42); 57);
58
43create table UserAppearances ( 59create table UserAppearances (
44 Owner TEXT not null, 60 Owner TEXT not null,
45 BodyItem TEXT, 61 BodyItem TEXT,
@@ -71,9 +87,22 @@ create table UserAppearances (
71 Texture BLOB, 87 Texture BLOB,
72 VisualParams BLOB, 88 VisualParams BLOB,
73 Serial INTEGER, 89 Serial INTEGER,
90 AvatarHeight NUMERIC,
74 primary key (Owner) 91 primary key (Owner)
75); 92);
76create index user_firstname on UserProfiles (FirstName);
77create index user_surname on UserProfiles (SurName);
78 93
79COMMIT; \ No newline at end of file 94
95CREATE TABLE UserFriends (
96 UserFriendID TEXT,
97 OwnerID TEXT,
98 FriendID TEXT,
99 FriendPermissions INTEGER,
100 primary key (UserFriendID)
101);
102
103create index UserFirstNameIndex on UserProfiles (FirstName);
104create index UserSurnameIndex on UserProfiles (SurName);
105create unique index UserFullNameIndex on UserProfiles (FirstName,SurName);
106create unique index UserFriendsOwnerFriendIndex on UserFriends (OwnerID,FriendID);
107
108COMMIT;
diff --git a/OpenSim/Data/NHibernate/Resources/UserAgentData.hbm.xml b/OpenSim/Data/NHibernate/Resources/UserAgentData.hbm.xml
index e10fb8f..70b6998 100644
--- a/OpenSim/Data/NHibernate/Resources/UserAgentData.hbm.xml
+++ b/OpenSim/Data/NHibernate/Resources/UserAgentData.hbm.xml
@@ -4,6 +4,7 @@
4 <id name="ProfileID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"> 4 <id name="ProfileID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
5 <generator class="assigned" /> 5 <generator class="assigned" />
6 </id> 6 </id>
7
7 <property name="AgentIP" type="String" length="24" /> 8 <property name="AgentIP" type="String" length="24" />
8 <property name="AgentPort" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" /> 9 <property name="AgentPort" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
9 <property name="AgentOnline" type="boolean" /> 10 <property name="AgentOnline" type="boolean" />
@@ -14,8 +15,18 @@
14 <property name="LoginTime" type="Int32" /> 15 <property name="LoginTime" type="Int32" />
15 <property name="LogoutTime" type="Int32" /> 16 <property name="LogoutTime" type="Int32" />
16 <property name="Handle" type="OpenSim.Data.NHibernate.UInt64Type, OpenSim.Data.NHibernate" /> 17 <property name="Handle" type="OpenSim.Data.NHibernate.UInt64Type, OpenSim.Data.NHibernate" />
17 <!-- <property name="PositionX" type="Single" /> 18
18 <property name="PositionY" type="Single" /> 19 <property name="Position" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
19 <property name="PositionZ" type="Single" /> --> 20 <column name="PositionX" />
21 <column name="PositionY" />
22 <column name="PositionZ" />
23 </property>
24
25 <property name="LookAt" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
26 <column name="LookAtX" />
27 <column name="LookAtY" />
28 <column name="LookAtZ" />
29 </property>
30
20 </class> 31 </class>
21</hibernate-mapping> 32</hibernate-mapping>
diff --git a/OpenSim/Data/NHibernate/Resources/UserAppearance.hbm.xml b/OpenSim/Data/NHibernate/Resources/UserAppearance.hbm.xml
index b633c34..21e547f 100644
--- a/OpenSim/Data/NHibernate/Resources/UserAppearance.hbm.xml
+++ b/OpenSim/Data/NHibernate/Resources/UserAppearance.hbm.xml
@@ -33,5 +33,6 @@
33 <property name="Texture" type="OpenSim.Data.NHibernate.TextureUserType, OpenSim.Data.NHibernate" /> 33 <property name="Texture" type="OpenSim.Data.NHibernate.TextureUserType, OpenSim.Data.NHibernate" />
34 <property name="VisualParams" type="binary" /> 34 <property name="VisualParams" type="binary" />
35 <property name="Serial" type="Int32" /> 35 <property name="Serial" type="Int32" />
36 <property name="AvatarHeight" type="Single" />
36 </class> 37 </class>
37</hibernate-mapping> 38</hibernate-mapping>
diff --git a/OpenSim/Data/NHibernate/Resources/UserFriend.hbm.xml b/OpenSim/Data/NHibernate/Resources/UserFriend.hbm.xml
new file mode 100644
index 0000000..70961b0
--- /dev/null
+++ b/OpenSim/Data/NHibernate/Resources/UserFriend.hbm.xml
@@ -0,0 +1,11 @@
1<?xml version="1.0" encoding="utf-8" ?>
2<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
3 <class name="OpenSim.Data.NHibernate.UserFriend, OpenSim.Data.NHibernate" table="UserFriends" lazy="false">
4 <id name="UserFriendID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
5 <generator class="assigned" />
6 </id>
7 <property name="OwnerID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
8 <property name="FriendID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
9 <property name="FriendPermissions" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
10 </class>
11</hibernate-mapping>
diff --git a/OpenSim/Data/NHibernate/Resources/UserProfileData.hbm.xml b/OpenSim/Data/NHibernate/Resources/UserProfileData.hbm.xml
index 740a9f1..5b1f9b0 100644
--- a/OpenSim/Data/NHibernate/Resources/UserProfileData.hbm.xml
+++ b/OpenSim/Data/NHibernate/Resources/UserProfileData.hbm.xml
@@ -4,11 +4,13 @@
4 <id name="ID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"> 4 <id name="ID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
5 <generator class="assigned" /> 5 <generator class="assigned" />
6 </id> 6 </id>
7 <property name="FirstName" index="user_firstname" type="String" length="32" /> 7 <property name="WebLoginKey" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
8 <property name="SurName" index="user_surname" type="String" length="32" /> 8 <property name="FirstName" index="UserFirstNameIndex" type="String" length="32" />
9 <property name="SurName" index="UserSurnameIndex" type="String" length="32" />
10 <property name="Email" type="String" length="250" />
9 <property name="PasswordHash" type="String" length="32" /> 11 <property name="PasswordHash" type="String" length="32" />
10 <property name="PasswordSalt" type="String" length="32" /> 12 <property name="PasswordSalt" type="String" length="32" />
11 <property name="WebLoginKey" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" /> 13 <property name="HomeRegionID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
12 <property name="HomeRegionX" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" /> 14 <property name="HomeRegionX" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
13 <property name="HomeRegionY" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" /> 15 <property name="HomeRegionY" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
14 <property name="HomeLocationX" type="Single" /> 16 <property name="HomeLocationX" type="Single" />
@@ -19,12 +21,18 @@
19 <property name="HomeLookAtZ" type="Single" /> 21 <property name="HomeLookAtZ" type="Single" />
20 <property name="Created" type="Int32" /> 22 <property name="Created" type="Int32" />
21 <property name="LastLogin" type="Int32" /> 23 <property name="LastLogin" type="Int32" />
22 <property name="RootInventoryFolderID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
23 <property name="UserInventoryURI" type="String" length="255"/> 24 <property name="UserInventoryURI" type="String" length="255"/>
24 <property name="UserAssetURI" type="String" length="255"/> 25 <property name="UserAssetURI" type="String" length="255"/>
25 <property name="Image" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" /> 26 <property name="Image" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
26 <property name="FirstLifeImage" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" /> 27 <property name="FirstLifeImage" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
27 <property name="AboutText" type="String" length="255" /> 28 <property name="AboutText" type="String" length="255" />
28 <property name="FirstLifeAboutText" type="String" length="255" /> 29 <property name="FirstLifeAboutText" type="String" length="255" />
30 <property name="CanDoMask" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
31 <property name="WantDoMask" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
32 <property name="UserFlags" type="Int32" />
33 <property name="GodLevel" type="Int32" />
34 <property name="CustomType" type="String" length="32" />
35 <property name="Partner" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
36 <property name="RootInventoryFolderID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
29 </class> 37 </class>
30</hibernate-mapping> 38</hibernate-mapping>