OpenSource » Database Migrator » Migrator2
Clone URL:  
Pushed to one repository · View In Graph Contained in tip

Migrator Case 50595
Started work on redesigned migrator

Changeset eabffc86b1eb

Parent b8035bc792d9

by Profile picture of Daniel PupekDaniel Pupek

Changes to one file · Browse files at eabffc86b1eb Showing diff from parent b8035bc792d9 Diff from another changeset...

 
614
615
616
617
618
619
620
621
 
 
 
 
 
 
 
622
623
624
 
626
627
628
629
 
630
631
632
 
614
615
616
 
 
 
 
 
617
618
619
620
621
622
623
624
625
626
 
628
629
630
 
631
632
633
634
@@ -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));   }