From bd2c345e56f0857d4d48e8bea509e00954be5d9f Mon Sep 17 00:00:00 2001
From: Charles Krinke
Date: Fri, 23 Jan 2009 20:21:43 +0000
Subject: 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.

---
 .../Resources/PostgreSQLDialect/001_UserStore.sql  | 104 +++++++++++++++++++++
 1 file changed, 104 insertions(+)
 create mode 100644 OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_UserStore.sql

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

diff --git a/OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_UserStore.sql b/OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_UserStore.sql
new file mode 100644
index 0000000..437b2a9
--- /dev/null
+++ b/OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_UserStore.sql
@@ -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);  
-- 
cgit v1.1

