mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-12-03 03:58:13 +08:00
The Version column is auto-mapped as a Versioning value. FLuent has a bug which prevents from altering this mapping. The simples solution is to change the type to int?. --HG-- branch : 1.x
This commit is contained in:
@@ -44,7 +44,7 @@ namespace Orchard.Data.Migration {
|
|||||||
var outOfDateMigrations = _dataMigrations.Where(dataMigration => {
|
var outOfDateMigrations = _dataMigrations.Where(dataMigration => {
|
||||||
DataMigrationRecord record;
|
DataMigrationRecord record;
|
||||||
if (currentVersions.TryGetValue(dataMigration.GetType().FullName, out record))
|
if (currentVersions.TryGetValue(dataMigration.GetType().FullName, out record))
|
||||||
return CreateUpgradeLookupTable(dataMigration).ContainsKey(record.Version);
|
return CreateUpgradeLookupTable(dataMigration).ContainsKey(record.Version.Value);
|
||||||
|
|
||||||
return (GetCreateMethod(dataMigration) != null);
|
return (GetCreateMethod(dataMigration) != null);
|
||||||
});
|
});
|
||||||
@@ -84,7 +84,7 @@ namespace Orchard.Data.Migration {
|
|||||||
|
|
||||||
var current = 0;
|
var current = 0;
|
||||||
if(dataMigrationRecord != null) {
|
if(dataMigrationRecord != null) {
|
||||||
current = dataMigrationRecord.Version;
|
current = dataMigrationRecord.Version.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
// do we need to call Create() ?
|
// do we need to call Create() ?
|
||||||
|
|||||||
@@ -2,6 +2,6 @@
|
|||||||
public class DataMigrationRecord {
|
public class DataMigrationRecord {
|
||||||
public virtual int Id { get; set; }
|
public virtual int Id { get; set; }
|
||||||
public virtual string DataMigrationClass { get; set; }
|
public virtual string DataMigrationClass { get; set; }
|
||||||
public virtual int Version { get; set; }
|
public virtual int? Version { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user