From 40f34aeffd64e2aa81cecb2e861f60d6e8886198 Mon Sep 17 00:00:00 2001
From: Charles Krinke
Date: Sun, 11 Jan 2009 18:24:16 +0000
Subject: 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.

---
 .../Resources/SQLiteDialect/001_UserStore.sql      | 39 +++++++++++++++++++---
 1 file changed, 34 insertions(+), 5 deletions(-)

(limited to 'OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_UserStore.sql')

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 (
    LoginTime INTEGER,
    LogoutTime INTEGER,
    Handle INTEGER,
+   PositionX NUMERIC,
+   PositionY NUMERIC,
+   PositionZ NUMERIC,
+   LookAtX NUMERIC,
+   LookAtY NUMERIC,
+   LookAtZ NUMERIC,     
    primary key (ProfileID)
 );
+
 create table UserProfiles (
   ID TEXT not null,
+   WebLoginKey TEXT,
    FirstName TEXT,
    SurName TEXT,
+   Email TEXT,
    PasswordHash TEXT,
    PasswordSalt TEXT,
-   WebLoginKey TEXT,
+   HomeRegionID TEXT,
    HomeRegionX INTEGER,
    HomeRegionY INTEGER,
    HomeLocationX NUMERIC,
@@ -31,15 +40,22 @@ create table UserProfiles (
    HomeLookAtZ NUMERIC,
    Created INTEGER,
    LastLogin INTEGER,
-   RootInventoryFolderID TEXT,
    UserInventoryURI TEXT,
    UserAssetURI TEXT,
    Image TEXT,
    FirstLifeImage TEXT,
    AboutText TEXT,
    FirstLifeAboutText TEXT,
+   RootInventoryFolderID TEXT,
+  `CanDoMask` INTEGER,
+  `WantDoMask` INTEGER,
+  `UserFlags` INTEGER,
+  `GodLevel` INTEGER,  
+  `CustomType` TEXT,
+  `Partner` TEXT,   
    primary key (ID)
 );
+
 create table UserAppearances (
   Owner TEXT not null,
    BodyItem TEXT,
@@ -71,9 +87,22 @@ create table UserAppearances (
    Texture BLOB,
    VisualParams BLOB,
    Serial INTEGER,
+   AvatarHeight NUMERIC,     
    primary key (Owner)
 );
-create index user_firstname on UserProfiles (FirstName);
-create index user_surname on UserProfiles (SurName);
 
-COMMIT;
\ No newline at end of file
+
+CREATE TABLE UserFriends (
+   UserFriendID TEXT,
+   OwnerID TEXT,
+   FriendID TEXT,
+   FriendPermissions INTEGER,
+   primary key (UserFriendID) 
+);
+
+create index UserFirstNameIndex on UserProfiles (FirstName);
+create index UserSurnameIndex on UserProfiles (SurName);
+create unique index UserFullNameIndex on UserProfiles (FirstName,SurName);
+create unique index UserFriendsOwnerFriendIndex on UserFriends (OwnerID,FriendID);
+
+COMMIT;
-- 
cgit v1.1

