From 37f7c5a0ea272761793e072f2439e5b8e5f30e13 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Tue, 20 Jan 2009 18:38:51 +0000
Subject: * Apply http://opensimulator.org/mantis/view.php?id=3020 * Adds a
grid db implementation and unit tests to the NHibernate module
---
.../Resources/MsSql2005Dialect/001_GridStore.sql | 8 ++--
.../Resources/MySQLDialect/001_GridStore.sql | 4 +-
.../NHibernate/Resources/RegionProfileData.hbm.xml | 44 ++++++++++++++++++++++
.../Data/NHibernate/Resources/RegionStore.hbm.xml | 33 +---------------
.../Resources/SQLiteDialect/001_GridStore.sql | 4 +-
5 files changed, 53 insertions(+), 40 deletions(-)
create mode 100644 OpenSim/Data/NHibernate/Resources/RegionProfileData.hbm.xml
(limited to 'OpenSim/Data/NHibernate/Resources')
diff --git a/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_GridStore.sql b/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_GridStore.sql
index 0dfec7f..e4ad525 100644
--- a/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_GridStore.sql
+++ b/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_GridStore.sql
@@ -1,5 +1,5 @@
create table Regions (
- Uuid NVARCHAR(255) not null,
+ Uuid NVARCHAR(36) not null,
RegionHandle BIGINT null,
RegionName NVARCHAR(32) null,
RegionRecvKey NVARCHAR(128) null,
@@ -24,9 +24,9 @@ create table Regions (
RegionUserSendKey NVARCHAR(128) null,
ServerHttpPort INT null,
ServerRemotingPort INT null,
- RegionMapTextureID NVARCHAR(255) null,
- Owner_uuid NVARCHAR(255) null,
- OriginUUID NVARCHAR(255) null,
+ RegionMapTextureID NVARCHAR(36) null,
+ Owner_uuid NVARCHAR(36) null,
+ OriginUUID NVARCHAR(36) null,
primary key (Uuid)
)
create index region_handle on Regions (RegionHandle)
diff --git a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_GridStore.sql b/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_GridStore.sql
index 5fb1c19..c6fe620 100644
--- a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_GridStore.sql
+++ b/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_GridStore.sql
@@ -24,10 +24,10 @@ CREATE TABLE Regions (
RegionUserURI VARCHAR(255) DEFAULT NULL,
RegionUserRecvKey VARCHAR(128) DEFAULT NULL,
RegionUserSendKey VARCHAR(128) DEFAULT NULL,
- RegionMapTexture VARCHAR(36) DEFAULT NULL,
+ RegionMapTextureId VARCHAR(36) DEFAULT NULL,
ServerHttpPort INT DEFAULT NULL,
ServerRemotingPort INT DEFAULT NULL,
- PRIMARY KEY (uuid),
+ PRIMARY KEY (RegionID)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
CREATE INDEX RegionNameIndex ON Regions (RegionName);
diff --git a/OpenSim/Data/NHibernate/Resources/RegionProfileData.hbm.xml b/OpenSim/Data/NHibernate/Resources/RegionProfileData.hbm.xml
new file mode 100644
index 0000000..5ff37d8
--- /dev/null
+++ b/OpenSim/Data/NHibernate/Resources/RegionProfileData.hbm.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OpenSim/Data/NHibernate/Resources/RegionStore.hbm.xml b/OpenSim/Data/NHibernate/Resources/RegionStore.hbm.xml
index 3144b0b..189389f 100644
--- a/OpenSim/Data/NHibernate/Resources/RegionStore.hbm.xml
+++ b/OpenSim/Data/NHibernate/Resources/RegionStore.hbm.xml
@@ -141,36 +141,5 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_GridStore.sql b/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_GridStore.sql
index 336a277..4f09848 100644
--- a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_GridStore.sql
+++ b/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_GridStore.sql
@@ -22,12 +22,12 @@ CREATE TABLE Regions (
RegionUserURI VARCHAR(255) DEFAULT NULL,
RegionUserRecvKey VARCHAR(128) DEFAULT NULL,
RegionUserSendKey VARCHAR(128) DEFAULT NULL,
- regionMapTexture VARCHAR(36) DEFAULT NULL,
+ RegionMapTextureId VARCHAR(36) DEFAULT NULL,
ServerHttpPort INT DEFAULT NULL,
ServerRemotingPort INT DEFAULT NULL,
OwnerID VARCHAR(36) DEFAULT NULL,
OriginID VARCHAR(36) DEFAULT NULL,
- PRIMARY KEY (uuid),
+ PRIMARY KEY (RegionId)
);
CREATE INDEX RegionNameIndex ON Regions (RegionName);
--
cgit v1.1