From 340ef33e2e27b2f5e9b29c41617aec9c542be5f8 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Mon, 16 Jun 2008 19:22:00 +0000 Subject: [PATCH] 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. --- OpenSim/Data/Migration.cs | 3 ++- .../NHibernate/Resources/SQLiteDialect/001_AssetStore.sql | 2 +- OpenSim/Data/NHibernate/Resources/UserAppearance.hbm.xml | 4 ++-- prebuild.xml | 3 +++ 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/OpenSim/Data/Migration.cs b/OpenSim/Data/Migration.cs index 30cd3b6169..9447deb8db 100644 --- a/OpenSim/Data/Migration.cs +++ b/OpenSim/Data/Migration.cs @@ -227,10 +227,11 @@ namespace OpenSim.Data foreach (string s in names) { + m_log.InfoFormat("[MIGRATION] - testing resoure {0}", s); Match m = _match.Match(s); if (m.Success) { - // m_log.Info("MIGRATION: Match: " + m.Groups[1].ToString()); + m_log.Info("MIGRATION: Match: " + m.Groups[1].ToString()); int version = int.Parse(m.Groups[1].ToString()); if (version > after) { 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 e553cff451..07994f4fc7 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( Description varchar(64), Local boolean, Temporary boolean, - Data blob, + Data blob ); END; \ 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 85d888d09d..0070e06e8f 100644 --- a/OpenSim/Data/NHibernate/Resources/UserAppearance.hbm.xml +++ b/OpenSim/Data/NHibernate/Resources/UserAppearance.hbm.xml @@ -1,7 +1,7 @@ - - + + diff --git a/prebuild.xml b/prebuild.xml index e5dd324691..7413b1b1ef 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -1339,6 +1339,9 @@ + + +