mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
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.
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -8,7 +8,7 @@ create table Assets(
|
||||
Description varchar(64),
|
||||
Local boolean,
|
||||
Temporary boolean,
|
||||
Data blob,
|
||||
Data blob
|
||||
);
|
||||
|
||||
END;
|
||||
@@ -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" />
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user