diff options
Diffstat (limited to 'OpenSim/Data/NHibernate/NHibernateAssetData.cs')
-rw-r--r-- | OpenSim/Data/NHibernate/NHibernateAssetData.cs | 27 |
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) |