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.
0.6.0-stable
Sean Dague 2008-06-16 19:22:00 +00:00
parent caa6b8467d
commit 340ef33e2e
4 changed files with 8 additions and 4 deletions

View File

@ -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))

View File

@ -8,7 +8,7 @@ create table Assets(
Description varchar(64),
Local boolean,
Temporary boolean,
Data blob,
Data blob
);
END;

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="OpenSim.Framework.UserAppearance, OpenSim.Framework" table="UserAppearances" lazy="false">
<id name="User" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate">
<class name="OpenSim.Framework.AvatarAppearance, OpenSim.Framework" table="UserAppearances" lazy="false">
<id name="Owner" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate">
<generator class="assigned" />
</id>
<property name="BodyItem" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" />

View File

@ -1339,6 +1339,9 @@
<Files>
<Match pattern="*.cs" recurse="true"/>
<Match path="Resources" pattern="*.xml" buildAction="EmbeddedResource"/>
<!-- add more as you go -->
<Match path="Resources/SQLiteDialect" pattern="*.sql" buildAction="EmbeddedResource"/>
<Match path="Resources/MySQLDialect" pattern="*.sql" buildAction="EmbeddedResource"/>
</Files>
</Project>