Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixing migration from old databases, will now mark the proper version…

… schema
  • Loading branch information...
commit e10d13be3d6cc0a562a845697a8e4935569ee1d0 1 parent 8b01311
@ayende ayende authored
Showing with 15 additions and 1 deletion.
  1. +15 −1 Raven.Storage.Esent/SchemaUpdates/From30To32.cs
View
16 Raven.Storage.Esent/SchemaUpdates/From30To32.cs
@@ -1,4 +1,5 @@
using System;
+using System.Text;
using Microsoft.Isam.Esent.Interop;
using Raven.Database.Extensions;
using Raven.Database.Impl;
@@ -58,7 +59,20 @@ public void Update(Session session, JET_DBID dbid)
tx = new Transaction(session);
}
}
- tx.Commit(CommitTransactionGrbit.LazyFlush);
+
+ using (var details = new Table(session, dbid, "details", OpenTableGrbit.None))
+ {
+ Api.JetMove(session, details, JET_Move.First, MoveGrbit.None);
+ var columnids = Api.GetColumnDictionary(session, details);
+
+ using (var update = new Update(session, details, JET_prep.Replace))
+ {
+ Api.SetColumn(session, details, columnids["schema_version"], "3.2", Encoding.Unicode);
+
+ update.Save();
+ }
+ }
+ tx.Commit(CommitTransactionGrbit.None);
tx.Dispose();
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.