Thank you kindly, TLaukkan (Tommil) for a patch that:

* Added Npgsql.dll and Mono.Security.dll which are NpgsqlDriver dlls.
* Added missing field to schema creation scripts: PathTaperY.
* Added schema creation scripts for PostgreSQL.
* Added unit test classes for PostgreSQL.
* Added schema creation script folder to NHibernate project in prebuild.xml
* Added Npgsql.dll to NHibernate test project dependencies in prebuild.xml
* Ensured that build works with both nant and Visual Studio.
* Executed build unit tests with nant and NHibernate unit tests with NUnitGUI
  - Couple of region tests fail due to double precission float rounding errors need to sort out how these are handles in unit tests and if higher precission numeric field needs to be used in Postgresql.
0.6.3-post-fixes
Charles Krinke 2009-01-23 20:21:43 +00:00
parent 664f983943
commit bd2c345e56
11 changed files with 369 additions and 0 deletions

View File

@ -60,6 +60,7 @@ create table Prims (
PathRadiusOffset TINYINT null, PathRadiusOffset TINYINT null,
PathRevolutions TINYINT null, PathRevolutions TINYINT null,
PathTaperX TINYINT null, PathTaperX TINYINT null,
PathTaperY TINYINT null,
PathTwist TINYINT null, PathTwist TINYINT null,
ProfileBegin SMALLINT null, ProfileBegin SMALLINT null,
ProfileEnd SMALLINT null, ProfileEnd SMALLINT null,
@ -99,3 +100,4 @@ create table Terrain (
primary key (RegionID) primary key (RegionID)
) )

View File

@ -0,0 +1,10 @@
CREATE TABLE Assets (
ID VARCHAR(36) NOT NULL,
Type SMALLINT DEFAULT NULL,
Name VARCHAR(64) DEFAULT NULL,
Description VARCHAR(64) DEFAULT NULL,
Local BOOLEAN DEFAULT NULL,
Temporary BOOLEAN DEFAULT NULL,
Data BYTEA,
PRIMARY KEY (ID)
);

View File

@ -0,0 +1,35 @@
CREATE TABLE Regions (
RegionID VARCHAR(36) NOT NULL,
OwnerID VARCHAR(36) DEFAULT NULL,
OriginID VARCHAR(36) DEFAULT NULL,
RegionHandle BIGINT DEFAULT 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 DEFAULT NULL,
ServerURI VARCHAR(255) DEFAULT NULL,
RegionLocX INT DEFAULT NULL,
RegionLocY INT DEFAULT NULL,
RegionLocZ INT DEFAULT NULL,
EastOverrideHandle BIGINT DEFAULT NULL,
WestOverrideHandle BIGINT DEFAULT NULL,
SouthOverrideHandle BIGINT DEFAULT NULL,
NorthOverrideHandle BIGINT 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,
RegionMapTextureId VARCHAR(36) DEFAULT NULL,
ServerHttpPort INT DEFAULT NULL,
ServerRemotingPort INT DEFAULT NULL,
PRIMARY KEY (RegionID)
);
CREATE INDEX RegionNameIndex ON Regions (RegionName);
CREATE INDEX RegionHandleIndex ON Regions (RegionHandle);
CREATE INDEX RegionHandlesIndex ON Regions (EastOverrideHandle,WestOverrideHandle,SouthOverrideHandle,NorthOverrideHandle);

View File

@ -0,0 +1,39 @@
CREATE TABLE InventoryFolders (
ID VARCHAR(36) NOT NULL,
Type SMALLINT DEFAULT NULL,
Version SMALLINT DEFAULT NULL,
ParentID VARCHAR(36) DEFAULT NULL,
Owner VARCHAR(36) DEFAULT NULL,
Name VARCHAR(64) DEFAULT NULL,
PRIMARY KEY (ID)
);
CREATE INDEX InventoryFoldersOwnerIdIndex ON InventoryFolders (Owner);
CREATE INDEX InventoryFoldersParentIdIndex ON InventoryFolders (ParentID);
CREATE TABLE InventoryItems (
ID VARCHAR(36) NOT NULL,
InvType SMALLINT DEFAULT NULL,
AssetType SMALLINT DEFAULT NULL,
AssetID VARCHAR(36) DEFAULT NULL,
Folder VARCHAR(36) DEFAULT NULL,
Owner VARCHAR(36) DEFAULT NULL,
Creator VARCHAR(36) DEFAULT NULL,
Name VARCHAR(64) DEFAULT NULL,
Description VARCHAR(64) DEFAULT NULL,
NextPermissions INT DEFAULT NULL,
CurrentPermissions INT DEFAULT NULL,
BasePermissions INT DEFAULT NULL,
EveryOnePermissions INT DEFAULT NULL,
GroupID VARCHAR(36) DEFAULT NULL,
GroupOwned BOOLEAN DEFAULT NULL,
SalePrice INT DEFAULT NULL,
SaleType SMALLINT DEFAULT NULL,
Flags INT DEFAULT NULL,
CreationDate INT DEFAULT NULL,
PRIMARY KEY (ID)
);
CREATE INDEX InventoryItemsGroupIdIndex ON InventoryItems (GroupID);
CREATE INDEX InventoryItemsOwnerIdIndex ON InventoryItems (Owner);
CREATE INDEX InventoryItemsFolderIdIndex ON InventoryItems (Folder);

View File

@ -0,0 +1,169 @@
CREATE TABLE Prims (
UUID VARCHAR(36) NOT NULL,
RegionID VARCHAR(36) DEFAULT NULL,
GroupID VARCHAR(36) DEFAULT NULL,
ParentID INT DEFAULT NULL,
ParentUUID VARCHAR(36) DEFAULT NULL,
OwnerID VARCHAR(36) DEFAULT NULL,
LastOwnerID VARCHAR(36) DEFAULT NULL,
CreatorID VARCHAR(36) DEFAULT NULL,
CreationDate INT DEFAULT NULL,
LinkNum INT DEFAULT NULL,
Name VARCHAR(255) DEFAULT NULL,
Text VARCHAR(255) DEFAULT NULL,
Description VARCHAR(255) DEFAULT NULL,
SitName VARCHAR(255) DEFAULT NULL,
TouchName VARCHAR(255) DEFAULT NULL,
ObjectFlags INT DEFAULT NULL,
OwnerMask INT DEFAULT NULL,
NextOwnerMask INT DEFAULT NULL,
GroupMask INT DEFAULT NULL,
EveryoneMask INT DEFAULT NULL,
BaseMask INT DEFAULT NULL,
Material SMALLINT DEFAULT NULL,
ScriptAccessPin INT DEFAULT NULL,
TextureAnimation BYTEA,
ParticleSystem BYTEA,
ClickAction SMALLINT DEFAULT NULL,
Color INT DEFAULT NULL,
PositionX DOUBLE PRECISION DEFAULT NULL,
PositionY DOUBLE PRECISION DEFAULT NULL,
PositionZ DOUBLE PRECISION DEFAULT NULL,
GroupPositionX DOUBLE PRECISION DEFAULT NULL,
GroupPositionY DOUBLE PRECISION DEFAULT NULL,
GroupPositionZ DOUBLE PRECISION DEFAULT NULL,
VelocityX DOUBLE PRECISION DEFAULT NULL,
VelocityY DOUBLE PRECISION DEFAULT NULL,
VelocityZ DOUBLE PRECISION DEFAULT NULL,
AngularVelocityX DOUBLE PRECISION DEFAULT NULL,
AngularVelocityY DOUBLE PRECISION DEFAULT NULL,
AngularVelocityZ DOUBLE PRECISION DEFAULT NULL,
AccelerationX DOUBLE PRECISION DEFAULT NULL,
AccelerationY DOUBLE PRECISION DEFAULT NULL,
AccelerationZ DOUBLE PRECISION DEFAULT NULL,
RotationX DOUBLE PRECISION DEFAULT NULL,
RotationY DOUBLE PRECISION DEFAULT NULL,
RotationZ DOUBLE PRECISION DEFAULT NULL,
RotationW DOUBLE PRECISION DEFAULT NULL,
SitTargetOffsetX DOUBLE PRECISION DEFAULT NULL,
SitTargetOffsetY DOUBLE PRECISION DEFAULT NULL,
SitTargetOffsetZ DOUBLE PRECISION DEFAULT NULL,
SitTargetOrientW DOUBLE PRECISION DEFAULT NULL,
SitTargetOrientX DOUBLE PRECISION DEFAULT NULL,
SitTargetOrientY DOUBLE PRECISION DEFAULT NULL,
SitTargetOrientZ DOUBLE PRECISION DEFAULT NULL,
-- this is the shape
Shape INT DEFAULT NULL,
ScaleX DOUBLE PRECISION DEFAULT NULL,
ScaleY DOUBLE PRECISION DEFAULT NULL,
ScaleZ DOUBLE PRECISION DEFAULT NULL,
PCode INT DEFAULT NULL,
PathBegin SMALLINT DEFAULT NULL,
PathEnd SMALLINT DEFAULT NULL,
PathScaleX INT DEFAULT NULL,
PathScaleY INT DEFAULT NULL,
PathShearX INT DEFAULT NULL,
PathShearY INT DEFAULT NULL,
PathSkew SMALLINT DEFAULT NULL,
PathCurve INT DEFAULT NULL,
PathRadiusOffset SMALLINT DEFAULT NULL,
PathRevolutions INT DEFAULT NULL,
PathTaperX SMALLINT DEFAULT NULL,
PathTaperY SMALLINT DEFAULT NULL,
PathTwist SMALLINT DEFAULT NULL,
PathTwistBegin INT DEFAULT NULL,
ProfileBegin SMALLINT DEFAULT NULL,
ProfileEnd SMALLINT DEFAULT NULL,
ProfileCurve INT DEFAULT NULL,
ProfileHollow SMALLINT DEFAULT NULL,
State INT DEFAULT NULL,
Texture BYTEA,
ExtraParams BYTEA,
PRIMARY KEY (UUID)
);
CREATE INDEX PrimsRegionIdIndex ON Prims (RegionID);
CREATE INDEX PrimsRegionParentUuidIndex ON Prims (ParentUUID);
CREATE TABLE Terrain (
RegionID VARCHAR(36) not null,
MapData BYTEA,
PRIMARY KEY (RegionID)
);
CREATE TABLE PrimItems (
ItemID VARCHAR(36) NOT NULL,
GroupID VARCHAR(36) DEFAULT NULL,
PrimID VARCHAR(36) DEFAULT NULL,
ParentFolderID VARCHAR(36) DEFAULT NULL,
AssetID VARCHAR(36) DEFAULT NULL,
OwnerID VARCHAR(36) DEFAULT NULL,
LastOwnerID VARCHAR(36) DEFAULT NULL,
CreatorID VARCHAR(36) DEFAULT NULL,
CreationDate INT DEFAULT NULL,
InvType INT DEFAULT NULL,
Name VARCHAR(255) DEFAULT NULL,
Description VARCHAR(255) DEFAULT NULL,
NextPermissions INT DEFAULT NULL,
CurrentPermissions INT DEFAULT NULL,
BasePermissions INT DEFAULT NULL,
EveryonePermissions INT DEFAULT NULL,
GroupPermissions INT DEFAULT NULL,
Flags INT DEFAULT NULL,
PRIMARY KEY (ItemID)
);
CREATE INDEX PrimItemsPrimIdIndex ON PrimItems (PrimID);
CREATE TABLE RegionSettings (
RegionID VARCHAR(36) NOT NULL,
BlockTerraform BOOLEAN DEFAULT NULL,
BlockFly BOOLEAN DEFAULT NULL,
AllowDamage BOOLEAN DEFAULT NULL,
RestrictPushing BOOLEAN DEFAULT NULL,
AllowLandResell BOOLEAN DEFAULT NULL,
AllowLandJoinDivide BOOLEAN DEFAULT NULL,
BlockShowInSearch BOOLEAN DEFAULT NULL,
AgentLimit INT DEFAULT NULL,
ObjectBonus DOUBLE PRECISION DEFAULT NULL,
Maturity INT DEFAULT NULL,
DisableScripts BOOLEAN DEFAULT NULL,
DisableCollisions BOOLEAN DEFAULT NULL,
DisablePhysics BOOLEAN DEFAULT NULL,
TerrainTexture1 VARCHAR(36) DEFAULT NULL,
TerrainTexture2 VARCHAR(36) DEFAULT NULL,
TerrainTexture3 VARCHAR(36) DEFAULT NULL,
TerrainTexture4 VARCHAR(36) DEFAULT NULL,
Elevation1NW DOUBLE PRECISION DEFAULT NULL,
Elevation2NW DOUBLE PRECISION DEFAULT NULL,
Elevation1NE DOUBLE PRECISION DEFAULT NULL,
Elevation2NE DOUBLE PRECISION DEFAULT NULL,
Elevation1SE DOUBLE PRECISION DEFAULT NULL,
Elevation2SE DOUBLE PRECISION DEFAULT NULL,
Elevation1SW DOUBLE PRECISION DEFAULT NULL,
Elevation2SW DOUBLE PRECISION DEFAULT NULL,
WaterHeight DOUBLE PRECISION DEFAULT NULL,
TerrainRaiseLimit DOUBLE PRECISION DEFAULT NULL,
TerrainLowerLimit DOUBLE PRECISION DEFAULT NULL,
UseEstateSun BOOLEAN DEFAULT NULL,
Sandbox BOOLEAN DEFAULT NULL,
SunVectorX DOUBLE PRECISION DEFAULT NULL,
SunVectorY DOUBLE PRECISION DEFAULT NULL,
SunVectorZ DOUBLE PRECISION DEFAULT NULL,
FixedSun BOOLEAN DEFAULT NULL,
SunPosition DOUBLE PRECISION DEFAULT NULL,
Covenant VARCHAR(36) DEFAULT NULL,
PRIMARY KEY (RegionID)
);

View File

@ -0,0 +1,104 @@
CREATE TABLE UserAgents (
ProfileID VARCHAR(36) NOT NULL,
AgentIP VARCHAR(24) DEFAULT NULL,
AgentPort INT DEFAULT NULL,
AgentOnline BOOLEAN DEFAULT NULL,
SessionID VARCHAR(36) DEFAULT NULL,
SecureSessionID VARCHAR(36) DEFAULT NULL,
InitialRegion VARCHAR(255) DEFAULT NULL,
Region VARCHAR(255) DEFAULT NULL,
LoginTime INT DEFAULT NULL,
LogoutTime INT DEFAULT NULL,
Handle BIGINT DEFAULT NULL,
PositionX DOUBLE PRECISION DEFAULT NULL,
PositionY DOUBLE PRECISION DEFAULT NULL,
PositionZ DOUBLE PRECISION DEFAULT NULL,
LookAtX DOUBLE PRECISION DEFAULT NULL,
LookAtY DOUBLE PRECISION DEFAULT NULL,
LookAtZ DOUBLE PRECISION DEFAULT NULL,
PRIMARY KEY (ProfileID)
);
CREATE TABLE UserProfiles (
ID VARCHAR(36) NOT NULL,
WebLoginKey VARCHAR(36) DEFAULT NULL,
FirstName VARCHAR(32) DEFAULT NULL,
SurName VARCHAR(32) DEFAULT NULL,
Email VARCHAR(250) DEFAULT NULL,
PasswordHash VARCHAR(32) DEFAULT NULL,
PasswordSalt VARCHAR(32) DEFAULT NULL,
HomeRegionID VARCHAR(36) DEFAULT NULL,
HomeRegionX INT DEFAULT NULL,
HomeRegionY INT DEFAULT NULL,
HomeLocationX DOUBLE PRECISION DEFAULT NULL,
HomeLocationY DOUBLE PRECISION DEFAULT NULL,
HomeLocationZ DOUBLE PRECISION DEFAULT NULL,
HomeLookAtX DOUBLE PRECISION DEFAULT NULL,
HomeLookAtY DOUBLE PRECISION DEFAULT NULL,
HomeLookAtZ DOUBLE PRECISION DEFAULT NULL,
Created INT DEFAULT NULL,
LastLogin INT DEFAULT NULL,
UserInventoryURI VARCHAR(255) DEFAULT NULL,
UserAssetURI VARCHAR(255) DEFAULT NULL,
Image VARCHAR(36) DEFAULT NULL,
FirstLifeImage VARCHAR(36) DEFAULT NULL,
AboutText TEXT DEFAULT NULL,
FirstLifeAboutText TEXT DEFAULT NULL,
CanDoMask INT DEFAULT NULL,
WantDoMask INT DEFAULT NULL,
UserFlags INT DEFAULT NULL,
GodLevel INT DEFAULT NULL,
CustomType VARCHAR(32) DEFAULT NULL,
Partner VARCHAR(36) DEFAULT NULL,
RootInventoryFolderID VARCHAR(36) DEFAULT NULL,
PRIMARY KEY (ID)
);
CREATE INDEX UserSurnameIndex ON UserProfiles (SurName);
CREATE INDEX UserFirstNameIndex ON UserProfiles (FirstName);
CREATE UNIQUE INDEX UserFullNameIndex ON UserProfiles (SurName,FirstName);
CREATE TABLE UserAppearances (
Owner VARCHAR(36) NOT NULL,
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 BYTEA,
VisualParams BYTEA,
Serial INT DEFAULT NULL,
AvatarHeight FLOAT DEFAULT NULL,
PRIMARY KEY (Owner)
);
CREATE TABLE UserFriends (
UserFriendID VARCHAR(36) NOT NULL,
OwnerID VARCHAR(36) DEFAULT NULL,
FriendID VARCHAR(36) DEFAULT NULL,
FriendPermissions INT DEFAULT NULL,
PRIMARY KEY (UserFriendID)
);
CREATE UNIQUE INDEX UserFriendsOwnerIdFriendIdIndex ON UserFriends (OwnerID,FriendID);

View File

@ -102,6 +102,7 @@
<property name="PathRadiusOffset" type="OpenSim.Data.NHibernate.SByteType, OpenSim.Data.NHibernate" /> <property name="PathRadiusOffset" type="OpenSim.Data.NHibernate.SByteType, OpenSim.Data.NHibernate" />
<property name="PathRevolutions" type="System.Byte" /> <property name="PathRevolutions" type="System.Byte" />
<property name="PathTaperX" type="OpenSim.Data.NHibernate.SByteType, OpenSim.Data.NHibernate" /> <property name="PathTaperX" type="OpenSim.Data.NHibernate.SByteType, OpenSim.Data.NHibernate" />
<property name="PathTaperY" type="OpenSim.Data.NHibernate.SByteType, OpenSim.Data.NHibernate" />
<property name="PathTwist" type="OpenSim.Data.NHibernate.SByteType, OpenSim.Data.NHibernate" /> <property name="PathTwist" type="OpenSim.Data.NHibernate.SByteType, OpenSim.Data.NHibernate" />
<property name="ProfileBegin" type="OpenSim.Data.NHibernate.UInt16Type, OpenSim.Data.NHibernate" /> <property name="ProfileBegin" type="OpenSim.Data.NHibernate.UInt16Type, OpenSim.Data.NHibernate" />
<property name="ProfileEnd" type="OpenSim.Data.NHibernate.UInt16Type, OpenSim.Data.NHibernate" /> <property name="ProfileEnd" type="OpenSim.Data.NHibernate.UInt16Type, OpenSim.Data.NHibernate" />

View File

@ -0,0 +1,7 @@
Copyright (c) 2002-2007, The Npgsql Development Team
Permission to use, copy, modify, and distribute this software and its documentation for any purpose, without fee, and without a written agreement is hereby granted, provided that the above copyright notice and this paragraph and the following two paragraphs appear in all copies.
IN NO EVENT SHALL THE NPGSQL DEVELOPMENT TEAM BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE NPGSQL DEVELOPMENT TEAM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THE NPGSQL DEVELOPMENT TEAM SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE NPGSQL DEVELOPMENT TEAM HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

BIN
bin/Mono.Security.dll Normal file

Binary file not shown.

BIN
bin/Npgsql.dll Normal file

Binary file not shown.

View File

@ -1610,6 +1610,7 @@
<Match path="Resources/SQLiteDialect" pattern="*.sql" buildAction="EmbeddedResource"/> <Match path="Resources/SQLiteDialect" pattern="*.sql" buildAction="EmbeddedResource"/>
<Match path="Resources/MySQLDialect" pattern="*.sql" buildAction="EmbeddedResource"/> <Match path="Resources/MySQLDialect" pattern="*.sql" buildAction="EmbeddedResource"/>
<Match path="Resources/MsSql2005Dialect" pattern="*.sql" buildAction="EmbeddedResource"/> <Match path="Resources/MsSql2005Dialect" pattern="*.sql" buildAction="EmbeddedResource"/>
<Match path="Resources/PostgreSQLDialect" pattern="*.sql" buildAction="EmbeddedResource"/>
</Files> </Files>
</Project> </Project>
@ -2576,6 +2577,7 @@
<Reference name="OpenMetaverseTypes.dll"/> <Reference name="OpenMetaverseTypes.dll"/>
<Reference name="OpenMetaverse.dll"/> <Reference name="OpenMetaverse.dll"/>
<Reference name="MySql.Data.dll"/> <Reference name="MySql.Data.dll"/>
<Reference name="Npgsql.dll"/>
<Reference name="System.Data.SQLite.dll" /> <Reference name="System.Data.SQLite.dll" />
<Reference name="log4net.dll"/> <Reference name="log4net.dll"/>
<Reference name="nunit.framework.dll" /> <Reference name="nunit.framework.dll" />