aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/NHibernate/NHibernateAssetData.cs
diff options
context:
space:
mode:
authorSean Dague2008-06-18 21:14:19 +0000
committerSean Dague2008-06-18 21:14:19 +0000
commit6dea8f34350d03b94ba6f52d8634598cc2de7503 (patch)
treea4191799839c5a084cfbef4294895bb5534dfbe5 /OpenSim/Data/NHibernate/NHibernateAssetData.cs
parentadd mysql migrations for nhibernate driver (diff)
downloadopensim-SC-6dea8f34350d03b94ba6f52d8634598cc2de7503.zip
opensim-SC-6dea8f34350d03b94ba6f52d8634598cc2de7503.tar.gz
opensim-SC-6dea8f34350d03b94ba6f52d8634598cc2de7503.tar.bz2
opensim-SC-6dea8f34350d03b94ba6f52d8634598cc2de7503.tar.xz
clean up the nhibernate definitions to work with mysql
integrate migration support into nhibernate
Diffstat (limited to 'OpenSim/Data/NHibernate/NHibernateAssetData.cs')
-rw-r--r--OpenSim/Data/NHibernate/NHibernateAssetData.cs27
1 files changed, 0 insertions, 27 deletions
diff --git a/OpenSim/Data/NHibernate/NHibernateAssetData.cs b/OpenSim/Data/NHibernate/NHibernateAssetData.cs
index bb5a3f3..5c691a7 100644
--- a/OpenSim/Data/NHibernate/NHibernateAssetData.cs
+++ b/OpenSim/Data/NHibernate/NHibernateAssetData.cs
@@ -93,33 +93,6 @@ namespace OpenSim.Data.NHibernate
93 Assembly assem = GetType().Assembly; 93 Assembly assem = GetType().Assembly;
94 Migration m = new Migration((System.Data.Common.DbConnection)factory.ConnectionProvider.GetConnection(), assem, dialect, "AssetStore"); 94 Migration m = new Migration((System.Data.Common.DbConnection)factory.ConnectionProvider.GetConnection(), assem, dialect, "AssetStore");
95 m.Update(); 95 m.Update();
96
97 }
98
99 private void InitDB()
100 {
101 string regex = @"no such table: Assets";
102 Regex RE = new Regex(regex, RegexOptions.Multiline);
103 try
104 {
105 using (ISession session = factory.OpenSession())
106 {
107 session.Load(typeof(AssetBase), LLUUID.Zero);
108 }
109 }
110 catch (ObjectNotFoundException)
111 {
112 // yes, we know it's not there, but that's ok
113 }
114 catch (ADOException e)
115 {
116 Match m = RE.Match(e.ToString());
117 if (m.Success)
118 {
119 // We don't have this table, so create it.
120 new SchemaExport(cfg).Create(true, true);
121 }
122 }
123 } 96 }
124 97
125 override public AssetBase FetchAsset(LLUUID uuid) 98 override public AssetBase FetchAsset(LLUUID uuid)