* Make MSSQL current in NHibernate
* Thanks mpallari
trunk
Justin Clarke Casey 2009-07-24 20:39:46 +00:00
parent a54998e1f9
commit 98687df56b
3 changed files with 88 additions and 1 deletions

View File

@ -0,0 +1,51 @@
ALTER TABLE Prims ADD LinkNum INT null;
ALTER TABLE Prims ADD Material TINYINT null;
ALTER TABLE Prims ADD ScriptAccessPin INT null;
ALTER TABLE Prims ADD TextureAnimation VARBINARY(max) null;
ALTER TABLE Prims ADD ParticleSystem VARBINARY(max) null;
ALTER TABLE Prims ADD ClickAction TINYINT null;
ALTER TABLE Prims ADD Color INT null;
CREATE TABLE RegionSettings
(
RegionID NVARCHAR(255) NOT NULL,
BlockTerraform bit NOT NULL,
BlockFly bit NOT NULL,
AllowDamage bit NOT NULL,
RestrictPushing bit NOT NULL,
AllowLandResell bit NOT NULL,
AllowLandJoinDivide bit NOT NULL,
BlockShowInSearch bit NOT NULL,
AgentLimit int NOT NULL,
ObjectBonus float(53) NOT NULL,
Maturity int NOT NULL,
DisableScripts bit NOT NULL,
DisableCollisions bit NOT NULL,
DisablePhysics bit NOT NULL,
TerrainTexture1 NVARCHAR(36) NOT NULL,
TerrainTexture2 NVARCHAR(36) NOT NULL,
TerrainTexture3 NVARCHAR(36) NOT NULL,
TerrainTexture4 NVARCHAR(36) NOT NULL,
Elevation1NW float(53) NOT NULL,
Elevation2NW float(53) NOT NULL,
Elevation1NE float(53) NOT NULL,
Elevation2NE float(53) NOT NULL,
Elevation1SE float(53) NOT NULL,
Elevation2SE float(53) NOT NULL,
Elevation1SW float(53) NOT NULL,
Elevation2SW float(53) NOT NULL,
WaterHeight float(53) NOT NULL,
TerrainRaiseLimit float(53) NOT NULL,
TerrainLowerLimit float(53) NOT NULL,
UseEstateSun bit NOT NULL,
FixedSun bit NOT NULL,
SunPosition float(53) NOT NULL,
Covenant NVARCHAR(36) NULL DEFAULT (NULL),
Sandbox bit NOT NULL,
SunVectorX float(53) NOT NULL DEFAULT ((0)),
SunVectorY float(53) NOT NULL DEFAULT ((0)),
SunVectorZ float(53) NOT NULL DEFAULT ((0)),
primary key (RegionID)
)

View File

@ -0,0 +1,27 @@
ALTER TABLE UserAgents ADD PositionX REAL null;
ALTER TABLE UserAgents ADD PositionY REAL null;
ALTER TABLE UserAgents ADD PositionZ REAL null;
ALTER TABLE UserAgents ADD LookAtX REAL null;
ALTER TABLE UserAgents ADD LookAtY REAL null;
ALTER TABLE UserAgents ADD LookAtZ REAL null;
ALTER TABLE UserProfiles ADD Email NVARCHAR(250) null;
ALTER TABLE UserProfiles ADD HomeRegionID NVARCHAR(36) null;
ALTER TABLE UserProfiles ADD CanDoMask INT null;
ALTER TABLE UserProfiles ADD WantDoMask INT null;
ALTER TABLE UserProfiles ADD UserFlags INT null;
ALTER TABLE UserProfiles ADD GodLevel INT null;
ALTER TABLE UserProfiles ADD CustomType NVARCHAR(32) null;
ALTER TABLE UserProfiles ADD Partner NVARCHAR(36) null;
ALTER TABLE UserAppearances ADD AvatarHeight FLOAT null;
CREATE TABLE UserFriends (
UserFriendID NVARCHAR(36) NOT NULL,
OwnerID NVARCHAR(36) NULL,
FriendID NVARCHAR(36) NULL,
FriendPermissions INT NULL,
PRIMARY KEY (UserFriendID)
);
CREATE INDEX UserFriendsOwnerIdFriendIdIndex ON UserFriends (OwnerID,FriendID);

View File

@ -73,7 +73,16 @@ namespace OpenSim.Data.NHibernate
int ord = rs.GetOrdinal(names[0]); int ord = rs.GetOrdinal(names[0]);
if (!rs.IsDBNull(ord)) if (!rs.IsDBNull(ord))
{ {
sbyte1 = Convert.ToSByte(rs.GetInt16(ord)); object tempO = rs.GetValue(ord);
if (tempO is Byte)
{
sbyte1 = Convert.ToSByte(((byte)tempO));
}
else
{
short temp = rs.GetInt16(ord);
sbyte1 = Convert.ToSByte(temp);
}
} }
return sbyte1; return sbyte1;
} }