mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Merge
--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() ?
|
||||||
|
@@ -4,7 +4,7 @@ namespace Orchard.Data.Migration.Records {
|
|||||||
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; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Reference in New Issue
Block a user