aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/NHibernate/Resources/SQLiteDialect
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/SQLiteDialect
parentThank you kindly, Tlaukkan (Tommil) for a patch that: (diff)
downloadopensim-SC_OLD-40f34aeffd64e2aa81cecb2e861f60d6e8886198.zip
opensim-SC_OLD-40f34aeffd64e2aa81cecb2e861f60d6e8886198.tar.gz
opensim-SC_OLD-40f34aeffd64e2aa81cecb2e861f60d6e8886198.tar.bz2
opensim-SC_OLD-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/SQLiteDialect')
-rw-r--r--OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_RegionStore.sql60
-rw-r--r--OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_UserStore.sql39
2 files changed, 88 insertions, 11 deletions
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;