aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorSean Dague2008-06-16 19:22:00 +0000
committerSean Dague2008-06-16 19:22:00 +0000
commit340ef33e2e27b2f5e9b29c41617aec9c542be5f8 (patch)
tree3de21e36df8ecf91ebfaf2c0cf04adee27cb9012 /OpenSim
parentfutzing around on the NHibernate side again trying to connect (diff)
downloadopensim-SC_OLD-340ef33e2e27b2f5e9b29c41617aec9c542be5f8.zip
opensim-SC_OLD-340ef33e2e27b2f5e9b29c41617aec9c542be5f8.tar.gz
opensim-SC_OLD-340ef33e2e27b2f5e9b29c41617aec9c542be5f8.tar.bz2
opensim-SC_OLD-340ef33e2e27b2f5e9b29c41617aec9c542be5f8.tar.xz
fix nhibernate driver so that it starts (based on the appearance
changes it wouldn't come up). include embedded dialect specific sql files for nhibernate migrations figure out how to get the raw db connection so that migrations can work with nhibernate. create initial migration for NHibernate + SQLite + Assets.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Data/Migration.cs3
-rw-r--r--OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_AssetStore.sql2
-rw-r--r--OpenSim/Data/NHibernate/Resources/UserAppearance.hbm.xml4
3 files changed, 5 insertions, 4 deletions
diff --git a/OpenSim/Data/Migration.cs b/OpenSim/Data/Migration.cs
index 30cd3b6..9447deb 100644
--- a/OpenSim/Data/Migration.cs
+++ b/OpenSim/Data/Migration.cs
@@ -227,10 +227,11 @@ namespace OpenSim.Data
227 227
228 foreach (string s in names) 228 foreach (string s in names)
229 { 229 {
230 m_log.InfoFormat("[MIGRATION] - testing resoure {0}", s);
230 Match m = _match.Match(s); 231 Match m = _match.Match(s);
231 if (m.Success) 232 if (m.Success)
232 { 233 {
233 // m_log.Info("MIGRATION: Match: " + m.Groups[1].ToString()); 234 m_log.Info("MIGRATION: Match: " + m.Groups[1].ToString());
234 int version = int.Parse(m.Groups[1].ToString()); 235 int version = int.Parse(m.Groups[1].ToString());
235 if (version > after) { 236 if (version > after) {
236 using (Stream resource = _assem.GetManifestResourceStream(s)) 237 using (Stream resource = _assem.GetManifestResourceStream(s))
diff --git a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_AssetStore.sql b/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_AssetStore.sql
index e553cff..07994f4 100644
--- a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_AssetStore.sql
+++ b/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_AssetStore.sql
@@ -8,7 +8,7 @@ create table Assets(
8 Description varchar(64), 8 Description varchar(64),
9 Local boolean, 9 Local boolean,
10 Temporary boolean, 10 Temporary boolean,
11 Data blob, 11 Data blob
12); 12);
13 13
14END; \ No newline at end of file 14END; \ No newline at end of file
diff --git a/OpenSim/Data/NHibernate/Resources/UserAppearance.hbm.xml b/OpenSim/Data/NHibernate/Resources/UserAppearance.hbm.xml
index 85d888d..0070e06 100644
--- a/OpenSim/Data/NHibernate/Resources/UserAppearance.hbm.xml
+++ b/OpenSim/Data/NHibernate/Resources/UserAppearance.hbm.xml
@@ -1,7 +1,7 @@
1<?xml version="1.0" encoding="utf-8" ?> 1<?xml version="1.0" encoding="utf-8" ?>
2<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"> 2<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
3 <class name="OpenSim.Framework.UserAppearance, OpenSim.Framework" table="UserAppearances" lazy="false"> 3 <class name="OpenSim.Framework.AvatarAppearance, OpenSim.Framework" table="UserAppearances" lazy="false">
4 <id name="User" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"> 4 <id name="Owner" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate">
5 <generator class="assigned" /> 5 <generator class="assigned" />
6 </id> 6 </id>
7 <property name="BodyItem" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 7 <property name="BodyItem" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" />