aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clarke Casey2009-01-12 17:51:43 +0000
committerJustin Clarke Casey2009-01-12 17:51:43 +0000
commitaf0fcb96a43137bfd1de0c8cca190522a549e492 (patch)
treefa28d846c81c21b7c0c6274eeb372ff57048b6dd
parent* Apply http://opensimulator.org/mantis/view.php?id=2980 (diff)
downloadopensim-SC_OLD-af0fcb96a43137bfd1de0c8cca190522a549e492.zip
opensim-SC_OLD-af0fcb96a43137bfd1de0c8cca190522a549e492.tar.gz
opensim-SC_OLD-af0fcb96a43137bfd1de0c8cca190522a549e492.tar.bz2
opensim-SC_OLD-af0fcb96a43137bfd1de0c8cca190522a549e492.tar.xz
* Apply http://opensimulator.org/mantis/view.php?id=2965
* Adds first version of MsSql2005Dialect support for NHibernate * Thanks mpallari
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/MSSQL/MSSQLRegionData.cs1
-rw-r--r--OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_AssetStore.sql10
-rw-r--r--OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_GridStore.sql35
-rw-r--r--OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_InventoryStore.sql36
-rw-r--r--OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_RegionStore.sql101
-rw-r--r--OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_UserStore.sql77
-rw-r--r--prebuild.xml1
7 files changed, 261 insertions, 0 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLRegionData.cs b/OpenSim/Data/MSSQL/MSSQLRegionData.cs
index e710d1c..87960f0 100644
--- a/OpenSim/Data/MSSQL/MSSQLRegionData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLRegionData.cs
@@ -1150,6 +1150,7 @@ VALUES
1150 #endregion 1150 #endregion
1151 1151
1152 #region Create parameters methods 1152 #region Create parameters methods
1153
1153 /// <summary> 1154 /// <summary>
1154 /// Creates the prim inventory parameters. 1155 /// Creates the prim inventory parameters.
1155 /// </summary> 1156 /// </summary>
diff --git a/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_AssetStore.sql b/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_AssetStore.sql
new file mode 100644
index 0000000..b998653
--- /dev/null
+++ b/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_AssetStore.sql
@@ -0,0 +1,10 @@
1create table Assets (
2 ID NVARCHAR(255) not null,
3 Type SMALLINT null,
4 Name NVARCHAR(64) null,
5 Description NVARCHAR(64) null,
6 Local BIT null,
7 Temporary BIT null,
8 Data VARBINARY(max) null,
9 primary key (ID)
10)
diff --git a/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_GridStore.sql b/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_GridStore.sql
new file mode 100644
index 0000000..0dfec7f
--- /dev/null
+++ b/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_GridStore.sql
@@ -0,0 +1,35 @@
1create table Regions (
2 Uuid NVARCHAR(255) not null,
3 RegionHandle BIGINT null,
4 RegionName NVARCHAR(32) null,
5 RegionRecvKey NVARCHAR(128) null,
6 RegionSendKey NVARCHAR(128) null,
7 RegionSecret NVARCHAR(128) null,
8 RegionDataURI NVARCHAR(255) null,
9 ServerIP NVARCHAR(64) null,
10 ServerPort INT null,
11 ServerURI NVARCHAR(255) null,
12 RegionLocX INT null,
13 RegionLocY INT null,
14 RegionLocZ INT null,
15 EastOverrideHandle BIGINT null,
16 WestOverrideHandle BIGINT null,
17 SouthOverrideHandle BIGINT null,
18 NorthOverrideHandle BIGINT null,
19 RegionAssetURI NVARCHAR(255) null,
20 RegionAssetRecvKey NVARCHAR(128) null,
21 RegionAssetSendKey NVARCHAR(128) null,
22 RegionUserURI NVARCHAR(255) null,
23 RegionUserRecvKey NVARCHAR(128) null,
24 RegionUserSendKey NVARCHAR(128) null,
25 ServerHttpPort INT null,
26 ServerRemotingPort INT null,
27 RegionMapTextureID NVARCHAR(255) null,
28 Owner_uuid NVARCHAR(255) null,
29 OriginUUID NVARCHAR(255) null,
30 primary key (Uuid)
31)
32create index region_handle on Regions (RegionHandle)
33create index region_name on Regions (RegionName)
34create index overrideHandles on Regions (EastOverrideHandle, WestOverrideHandle, SouthOverrideHandle, NorthOverrideHandle)
35
diff --git a/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_InventoryStore.sql b/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_InventoryStore.sql
new file mode 100644
index 0000000..37ba733
--- /dev/null
+++ b/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_InventoryStore.sql
@@ -0,0 +1,36 @@
1create table InventoryFolders (
2 ID NVARCHAR(255) not null,
3 Type SMALLINT null,
4 Version SMALLINT null,
5 ParentID NVARCHAR(255) null,
6 Owner NVARCHAR(255) null,
7 Name NVARCHAR(64) null,
8 primary key (ID)
9)
10create table InventoryItems (
11 ID NVARCHAR(255) not null,
12 InvType INT null,
13 AssetType INT null,
14 AssetID NVARCHAR(255) null,
15 Folder NVARCHAR(255) null,
16 Owner NVARCHAR(255) null,
17 Creator NVARCHAR(255) null,
18 Name NVARCHAR(64) null,
19 Description NVARCHAR(64) null,
20 NextPermissions INT null,
21 CurrentPermissions INT null,
22 BasePermissions INT null,
23 EveryOnePermissions INT null,
24 GroupID NVARCHAR(255) null,
25 GroupOwned BIT null,
26 SalePrice INT null,
27 SaleType TINYINT null,
28 Flags INT null,
29 CreationDate INT null,
30 primary key (ID)
31)
32create index item_group_id on InventoryItems (GroupID)
33create index item_folder_id on InventoryItems (Folder)
34create index item_owner_id on InventoryItems (Owner)
35create index folder_owner_id on InventoryFolders (Owner)
36create index folder_parent_id on InventoryFolders (ParentID)
diff --git a/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_RegionStore.sql b/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_RegionStore.sql
new file mode 100644
index 0000000..934e12f
--- /dev/null
+++ b/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_RegionStore.sql
@@ -0,0 +1,101 @@
1create table Prims (
2 UUID NVARCHAR(255) not null,
3 ParentID INT null,
4 ParentUUID NVARCHAR(255) null,
5 RegionID NVARCHAR(255) null,
6 CreationDate INT null,
7 Name NVARCHAR(255) null,
8 Text NVARCHAR(255) null,
9 Description NVARCHAR(255) null,
10 SitName NVARCHAR(255) null,
11 TouchName NVARCHAR(255) null,
12 ObjectFlags INT null,
13 CreatorID NVARCHAR(255) null,
14 OwnerID NVARCHAR(255) null,
15 GroupID NVARCHAR(255) null,
16 LastOwnerID NVARCHAR(255) null,
17 OwnerMask INT null,
18 NextOwnerMask INT null,
19 GroupMask INT null,
20 EveryoneMask INT null,
21 BaseMask INT null,
22 PositionX REAL null,
23 PositionY REAL null,
24 PositionZ REAL null,
25 GroupPositionX REAL null,
26 GroupPositionY REAL null,
27 GroupPositionZ REAL null,
28 VelocityX REAL null,
29 VelocityY REAL null,
30 VelocityZ REAL null,
31 AngularVelocityX REAL null,
32 AngularVelocityY REAL null,
33 AngularVelocityZ REAL null,
34 AccelerationX REAL null,
35 AccelerationY REAL null,
36 AccelerationZ REAL null,
37 SitTargetOffsetX REAL null,
38 SitTargetOffsetY REAL null,
39 SitTargetOffsetZ REAL null,
40 RotationX REAL null,
41 RotationY REAL null,
42 RotationZ REAL null,
43 RotationW REAL null,
44 SitTargetOrientX REAL null,
45 SitTargetOrientY REAL null,
46 SitTargetOrientZ REAL null,
47 SitTargetOrientW REAL null,
48 ScaleX REAL null,
49 ScaleY REAL null,
50 ScaleZ REAL null,
51 PCode TINYINT null,
52 PathBegin SMALLINT null,
53 PathEnd SMALLINT null,
54 PathScaleX TINYINT null,
55 PathScaleY TINYINT null,
56 PathShearX TINYINT null,
57 PathShearY TINYINT null,
58 PathSkew TINYINT null,
59 PathCurve TINYINT null,
60 PathRadiusOffset TINYINT null,
61 PathRevolutions TINYINT null,
62 PathTaperX TINYINT null,
63 PathTwist TINYINT null,
64 ProfileBegin SMALLINT null,
65 ProfileEnd SMALLINT null,
66 ProfileCurve TINYINT null,
67 ProfileHollow SMALLINT null,
68 Texture VARBINARY(8000) null,
69 ExtraParams VARBINARY(8000) null,
70 State TINYINT null,
71 primary key (UUID)
72)
73
74create table PrimItems (
75 ItemID NVARCHAR(255) not null,
76 PrimID NVARCHAR(255) null,
77 AssetID NVARCHAR(255) null,
78 ParentFolderID NVARCHAR(255) null,
79 CreatorID NVARCHAR(255) null,
80 OwnerID NVARCHAR(255) null,
81 GroupID NVARCHAR(255) null,
82 LastOwnerID NVARCHAR(255) null,
83 CurrentPermissions INT null,
84 BasePermissions INT null,
85 EveryonePermissions INT null,
86 GroupPermissions INT null,
87 NextPermissions INT null,
88 Name NVARCHAR(255) null,
89 Description NVARCHAR(255) null,
90 CreationDate INT null,
91 Flags INT null,
92 InvType INT null,
93 primary key (ItemID)
94)
95
96create table Terrain (
97 RegionID NVARCHAR(255) not null,
98 MapData VARBINARY(max) null,
99 primary key (RegionID)
100)
101
diff --git a/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_UserStore.sql b/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_UserStore.sql
new file mode 100644
index 0000000..c9c6c89
--- /dev/null
+++ b/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_UserStore.sql
@@ -0,0 +1,77 @@
1create table UserAgents (
2 ProfileID NVARCHAR(255) not null,
3 AgentIP NVARCHAR(24) null,
4 AgentPort INT null,
5 AgentOnline BIT null,
6 SessionID NVARCHAR(255) null,
7 SecureSessionID NVARCHAR(255) null,
8 InitialRegion NVARCHAR(255) null,
9 Region NVARCHAR(255) null,
10 LoginTime INT null,
11 LogoutTime INT null,
12 Handle BIGINT null,
13 primary key (ProfileID)
14)
15
16create table UserProfiles (
17 ID NVARCHAR(255) not null,
18 FirstName NVARCHAR(32) null,
19 SurName NVARCHAR(32) null,
20 PasswordHash NVARCHAR(32) null,
21 PasswordSalt NVARCHAR(32) null,
22 WebLoginKey NVARCHAR(255) null,
23 HomeRegionX INT null,
24 HomeRegionY INT null,
25 HomeLocationX REAL null,
26 HomeLocationY REAL null,
27 HomeLocationZ REAL null,
28 HomeLookAtX REAL null,
29 HomeLookAtY REAL null,
30 HomeLookAtZ REAL null,
31 Created INT null,
32 LastLogin INT null,
33 RootInventoryFolderID NVARCHAR(255) null,
34 UserInventoryURI NVARCHAR(255) null,
35 UserAssetURI NVARCHAR(255) null,
36 Image NVARCHAR(255) null,
37 FirstLifeImage NVARCHAR(255) null,
38 AboutText NVARCHAR(255) null,
39 FirstLifeAboutText NVARCHAR(255) null,
40 primary key (ID)
41)
42create table UserAppearances (
43 Owner NVARCHAR(255) not null,
44 BodyItem NVARCHAR(255) null,
45 BodyAsset NVARCHAR(255) null,
46 SkinItem NVARCHAR(255) null,
47 SkinAsset NVARCHAR(255) null,
48 HairItem NVARCHAR(255) null,
49 HairAsset NVARCHAR(255) null,
50 EyesItem NVARCHAR(255) null,
51 EyesAsset NVARCHAR(255) null,
52 ShirtItem NVARCHAR(255) null,
53 ShirtAsset NVARCHAR(255) null,
54 PantsItem NVARCHAR(255) null,
55 PantsAsset NVARCHAR(255) null,
56 ShoesItem NVARCHAR(255) null,
57 ShoesAsset NVARCHAR(255) null,
58 SocksItem NVARCHAR(255) null,
59 SocksAsset NVARCHAR(255) null,
60 JacketItem NVARCHAR(255) null,
61 JacketAsset NVARCHAR(255) null,
62 GlovesItem NVARCHAR(255) null,
63 GlovesAsset NVARCHAR(255) null,
64 UnderShirtItem NVARCHAR(255) null,
65 UnderShirtAsset NVARCHAR(255) null,
66 UnderPantsItem NVARCHAR(255) null,
67 UnderPantsAsset NVARCHAR(255) null,
68 SkirtItem NVARCHAR(255) null,
69 SkirtAsset NVARCHAR(255) null,
70 Texture VARBINARY(8000) null,
71 VisualParams VARBINARY(8000) null,
72 Serial INT null,
73 primary key (Owner)
74)
75
76create index user_surname on UserProfiles (SurName)
77create index user_firstname on UserProfiles (FirstName)
diff --git a/prebuild.xml b/prebuild.xml
index 64c9588..517954b 100644
--- a/prebuild.xml
+++ b/prebuild.xml
@@ -1607,6 +1607,7 @@
1607 <!-- add more as you go --> 1607 <!-- add more as you go -->
1608 <Match path="Resources/SQLiteDialect" pattern="*.sql" buildAction="EmbeddedResource"/> 1608 <Match path="Resources/SQLiteDialect" pattern="*.sql" buildAction="EmbeddedResource"/>
1609 <Match path="Resources/MySQLDialect" pattern="*.sql" buildAction="EmbeddedResource"/> 1609 <Match path="Resources/MySQLDialect" pattern="*.sql" buildAction="EmbeddedResource"/>
1610 <Match path="Resources/MsSql2005Dialect" pattern="*.sql" buildAction="EmbeddedResource"/>
1610 </Files> 1611 </Files>
1611 </Project> 1612 </Project>
1612 1613