Changeset eabffc86b1eb…
Parent b8035bc792d9…
by Daniel Pupek
Changes to one file · Browse files at eabffc86b1eb Showing diff from parent b8035bc792d9 Diff from another changeset...
@@ -614,11 +614,13 @@ return (int)ExecuteScalar(String.Format("SELECT Top 1 Version FROM {1} WHERE AssemblyId='{0}' Order By Version Desc", assemblyId, MigrationsTrackingTable));
}
- /// <summary>
- /// Record the current version in the Migration Tracking Table
- /// </summary>
- /// <param name="version">the new version to set</param>
- protected virtual void RecordMigration(int version, String assemblyId)
+ /// <summary>
+ /// Record the current version in the Migration Tracking Table
+ /// </summary>
+ /// <param name="version">the new version to set</param>
+ /// <param name="assemblyId"></param>
+ /// <param name="date"></param>
+ protected virtual void RecordMigration(int version, String assemblyId, DateTime date = DateTime.UtcNow)
{
if (assemblyId == null)
throw new ArgumentException();
@@ -626,7 +628,7 @@ if (!TableExists(MigrationsTrackingTable))
CreateSchemaInfoTable();
// TODO: needs to do an update if required
- ExecuteNonQuery(string.Format("INSERT INTO {1} (Version, AssemblyId, UtcDateMigratedColumn) VALUES ({2}, '{0}', '{3}')", assemblyId, MigrationsTrackingTable, version, DateTime.UtcNow));
+ ExecuteNonQuery(string.Format("INSERT INTO {1} (Version, AssemblyId, UtcDateMigratedColumn) VALUES ({2}, '{0}', '{3}')", assemblyId, MigrationsTrackingTable, version, date));
}
|
Loading...